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

Method new

atomic-core/src/diff/ops.rs:311–318  ·  view source on GitHub ↗

Create a new replacement.

(old: usize, old_len: usize, new: usize, new_len: usize)

Source from the content-addressed store, hash-verified

309impl Replacement {
310 /// Create a new replacement.
311 pub fn new(old: usize, old_len: usize, new: usize, new_len: usize) -> Self {
312 Self {
313 old,
314 old_len,
315 new,
316 new_len,
317 }
318 }
319
320 /// Create a pure insertion (no deletion).
321 pub fn insertion(old_pos: usize, new_pos: usize, len: usize) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected