MCPcopy Create free account
hub / github.com/douglance/devsql / inclusive_line_for_end

Method inclusive_line_for_end

crates/devsql/src/providers/mod.rs:69–75  ·  view source on GitHub ↗

Line number for an exclusive end byte (inclusive end).

(&self, end_byte: usize)

Source from the content-addressed store, hash-verified

67
68 /// Line number for an exclusive end byte (inclusive end).
69 pub fn inclusive_line_for_end(&self, end_byte: usize) -> usize {
70 if end_byte == 0 {
71 1
72 } else {
73 self.line_for_byte(end_byte.saturating_sub(1))
74 }
75 }
76
77 pub fn line_text(&self, line: usize) -> &str {
78 if line == 0 {

Callers 1

Calls 1

line_for_byteMethod · 0.80

Tested by

no test coverage detected