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

Method insertions

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

Get the number of lines inserted by this operation.

(&self)

Source from the content-addressed store, hash-verified

208
209 /// Get the number of lines inserted by this operation.
210 pub fn insertions(&self) -> usize {
211 match *self {
212 DiffOp::Equal { .. } => 0,
213 DiffOp::Insert { len, .. } => len,
214 DiffOp::Delete { .. } => 0,
215 DiffOp::Replace { new_len, .. } => new_len,
216 }
217 }
218}
219
220impl fmt::Display for DiffOp {

Callers 3

edit_distanceMethod · 0.45
additionsMethod · 0.45
from_diffMethod · 0.45

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected