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

Function lines

atomic-core/src/diff/myers.rs:198–200  ·  view source on GitHub ↗

Helper to create lines from strings

(strs: &[&'a str])

Source from the content-addressed store, hash-verified

196
197 /// Helper to create lines from strings
198 fn lines<'a>(strs: &[&'a str]) -> Vec<Line<'a>> {
199 strs.iter().map(|s| Line::new(s.as_bytes())).collect()
200 }
201
202 #[test]
203 fn test_empty_sequences() {

Callers 15

test_insert_allFunction · 0.70
test_delete_allFunction · 0.70
test_identicalFunction · 0.70
test_single_insertFunction · 0.70
test_single_deleteFunction · 0.70
test_replaceFunction · 0.70
test_multiple_changesFunction · 0.70
test_insert_at_startFunction · 0.70
test_insert_at_endFunction · 0.70
test_delete_at_startFunction · 0.70
test_delete_at_endFunction · 0.70

Calls 2

iterMethod · 0.45
as_bytesMethod · 0.45

Tested by 15

test_insert_allFunction · 0.56
test_delete_allFunction · 0.56
test_identicalFunction · 0.56
test_single_insertFunction · 0.56
test_single_deleteFunction · 0.56
test_replaceFunction · 0.56
test_multiple_changesFunction · 0.56
test_insert_at_startFunction · 0.56
test_insert_at_endFunction · 0.56
test_delete_at_startFunction · 0.56
test_delete_at_endFunction · 0.56