MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / write

Method write

atomic-core/src/output/repo/writer.rs:358–364  ·  view source on GitHub ↗
(&mut self, buf: &[u8])

Source from the content-addressed store, hash-verified

356
357impl<W: Write> Write for ConflictWriter<W> {
358 fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
359 let n = self.writer.write(buf)?;
360 self.bytes_written += n as u64;
361 self.line += Self::count_newlines(&buf[..n]);
362 self.at_line_start = buf.get(n.saturating_sub(1)).copied() == Some(b'\n');
363 Ok(n)
364 }
365
366 fn flush(&mut self) -> std::io::Result<()> {
367 self.writer.flush()

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected