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

Method all_deleted

atomic-core/src/diff/inline.rs:369–383  ·  view source on GitHub ↗

Create an inline diff where the old line was completely deleted.

(old_content: &'a [u8], new_content: &'a [u8])

Source from the content-addressed store, hash-verified

367
368 /// Create an inline diff where the old line was completely deleted.
369 fn all_deleted(old_content: &'a [u8], new_content: &'a [u8]) -> Self {
370 let old_hunks = if !old_content.is_empty() {
371 vec![ChangeHunk::deleted(0, old_content.len())]
372 } else {
373 vec![]
374 };
375
376 Self {
377 old_content,
378 new_content,
379 old_hunks,
380 new_hunks: vec![],
381 has_changes: true,
382 }
383 }
384
385 /// Create an inline diff where the new line was completely inserted.
386 fn all_inserted(old_content: &'a [u8], new_content: &'a [u8]) -> Self {

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected