MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / empty_file_no_error

Function empty_file_no_error

nodedb/src/data/io/fadvise.rs:150–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148
149 #[test]
150 fn empty_file_no_error() {
151 let dir = tempfile::tempdir().unwrap();
152 let path = dir.path().join("empty.col");
153 std::fs::File::create(&path).unwrap();
154 let len = advise_willneed(&path).unwrap();
155 assert_eq!(len, 0);
156 advise_dontneed(&path).unwrap();
157 }
158}

Callers

nothing calls this directly

Calls 5

advise_willneedFunction · 0.85
joinMethod · 0.80
advise_dontneedFunction · 0.70
createFunction · 0.50
pathMethod · 0.45

Tested by

no test coverage detected