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

Function count_line_units

atomic-cli/src/commands/git/parallel.rs:2211–2217  ·  view source on GitHub ↗
(content: &[u8])

Source from the content-addressed store, hash-verified

2209}
2210
2211fn count_line_units(content: &[u8]) -> usize {
2212 if content.is_empty() {
2213 0
2214 } else {
2215 content.split_inclusive(|&b| b == b'\n').count()
2216 }
2217}
2218
2219#[derive(Clone, Debug)]
2220struct ImportLine {

Callers 1

Calls 2

is_emptyMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected