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

Method fmt

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

Source from the content-addressed store, hash-verified

232
233impl std::fmt::Display for WordDiffOp {
234 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
235 match self {
236 WordDiffOp::Equal {
237 old_range,
238 new_range,
239 } => {
240 write!(f, "Equal(old:{:?}, new:{:?})", old_range, new_range)
241 }
242 WordDiffOp::Insert { old_pos, new_range } => {
243 write!(f, "Insert(@{}, new:{:?})", old_pos, new_range)
244 }
245 WordDiffOp::Delete { old_range, new_pos } => {
246 write!(f, "Delete(old:{:?}, @{})", old_range, new_pos)
247 }
248 WordDiffOp::Replace {
249 old_range,
250 new_range,
251 } => {
252 write!(f, "Replace(old:{:?}, new:{:?})", old_range, new_range)
253 }
254 }
255 }
256}
257
258/// Result of a word-level diff operation.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected