MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / modify

Method modify

easy-fs/src/block_cache.rs:59–61  ·  view source on GitHub ↗
(&mut self, offset: usize, f: impl FnOnce(&mut T) -> V)

Source from the content-addressed store, hash-verified

57 }
58
59 pub fn modify<T, V>(&mut self, offset: usize, f: impl FnOnce(&mut T) -> V) -> V {
60 f(self.get_mut(offset))
61 }
62
63 pub fn sync(&mut self) {
64 if self.modified {

Callers 9

createMethod · 0.80
dealloc_dataMethod · 0.80
allocMethod · 0.80
deallocMethod · 0.80
increase_sizeMethod · 0.80
clear_sizeMethod · 0.80
write_atMethod · 0.80
modify_disk_inodeMethod · 0.80
createMethod · 0.80

Calls 2

fFunction · 0.50
get_mutMethod · 0.45

Tested by

no test coverage detected