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

Method new_len

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

Get the number of new tokens affected by this operation.

(&self)

Source from the content-addressed store, hash-verified

221
222 /// Get the number of new tokens affected by this operation.
223 pub fn new_len(&self) -> usize {
224 match self {
225 WordDiffOp::Equal { new_range, .. } => new_range.len(),
226 WordDiffOp::Insert { new_range, .. } => new_range.len(),
227 WordDiffOp::Replace { new_range, .. } => new_range.len(),
228 WordDiffOp::Delete { .. } => 0,
229 }
230 }
231}
232
233impl std::fmt::Display for WordDiffOp {

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected