MCPcopy Create free account
hub / github.com/git/git / write

Method write

src/csum_file.rs:48–59  ·  view source on GitHub ↗
(&mut self, data: &[u8])

Source from the content-addressed store, hash-verified

46
47impl Write for HashFile {
48 fn write(&mut self, data: &[u8]) -> io::Result<usize> {
49 for chunk in data.chunks(u32::MAX as usize) {
50 unsafe {
51 c::hashwrite(
52 self.ptr,
53 chunk.as_ptr() as *const c_void,
54 chunk.len() as u32,
55 )
56 };
57 }
58 Ok(data.len())
59 }
60
61 fn flush(&mut self) -> io::Result<()> {
62 unsafe { c::hashflush(self.ptr) };

Callers

nothing calls this directly

Calls 2

hashwriteFunction · 0.85
lenMethod · 0.80

Tested by

no test coverage detected