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

Method old_len

atomic-core/src/diff/word.rs:213–220  ·  view source on GitHub ↗

Get the number of old tokens affected by this operation.

(&self)

Source from the content-addressed store, hash-verified

211
212 /// Get the number of old tokens affected by this operation.
213 pub fn old_len(&self) -> usize {
214 match self {
215 WordDiffOp::Equal { old_range, .. } => old_range.len(),
216 WordDiffOp::Delete { old_range, .. } => old_range.len(),
217 WordDiffOp::Replace { old_range, .. } => old_range.len(),
218 WordDiffOp::Insert { .. } => 0,
219 }
220 }
221
222 /// Get the number of new tokens affected by this operation.
223 pub fn new_len(&self) -> usize {

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected