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

Method fmt

atomic-core/src/diff/line.rs:350–356  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

348
349impl<'a> std::fmt::Debug for Line<'a> {
350 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
351 // Try to display as UTF-8 string, fall back to byte representation
352 match std::str::from_utf8(self.content) {
353 Ok(s) => write!(f, "Line({:?})", s),
354 Err(_) => write!(f, "Line({:?})", self.content),
355 }
356 }
357}
358
359impl<'a> AsRef<[u8]> for Line<'a> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected