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

Method new_content_in_range

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

Get the concatenated content of new tokens in a range.

(&self, range: &Range<usize>)

Source from the content-addressed store, hash-verified

429
430 /// Get the concatenated content of new tokens in a range.
431 pub fn new_content_in_range(&self, range: &Range<usize>) -> String {
432 self.new_tokens[range.clone()]
433 .iter()
434 .map(|t| t.as_str())
435 .collect::<Vec<_>>()
436 .concat()
437 }
438
439 /// Add an operation to the result.
440 fn push(&mut self, op: WordDiffOp) {

Callers

nothing calls this directly

Calls 4

concatMethod · 0.80
iterMethod · 0.45
cloneMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected