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

Method fmt

atomic-core/src/record/workflow/graph_op/pending.rs:268–296  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

266
267impl fmt::Display for PendingChange {
268 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
269 match self.kind {
270 PendingChangeKind::Insert => {
271 write!(
272 f,
273 "Insert {} line(s) at line {}",
274 self.new_len,
275 self.new_start + 1
276 )
277 }
278 PendingChangeKind::Delete => {
279 write!(
280 f,
281 "Delete {} line(s) from line {}",
282 self.old_len,
283 self.old_start + 1
284 )
285 }
286 PendingChangeKind::Replace => {
287 write!(
288 f,
289 "Replace {} line(s) with {} line(s) at line {}",
290 self.old_len,
291 self.new_len,
292 self.old_start + 1
293 )
294 }
295 }
296 }
297}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected