Method
modify_byte_at
(&mut self, pos: usize, f: impl FnOnce(u8) -> u8)
Source from the content-addressed store, hash-verified
| 84 | } |
| 85 | |
| 86 | pub fn modify_byte_at(&mut self, pos: usize, f: impl FnOnce(u8) -> u8) { |
| 87 | let mut storage = self.storage.write().unwrap(); |
| 88 | storage.buf[pos] = f(storage.buf[pos]) |
| 89 | } |
| 90 | |
| 91 | pub fn modify_bytes_at(&mut self, range: impl SliceIndex<[u8], Output = [u8]>, f: impl FnOnce(&mut [u8])) { |
| 92 | let mut storage = self.storage.write().unwrap(); |
Callers
nothing calls this directly
Tested by
no test coverage detected