MCPcopy Create free account
hub / github.com/csskit/csskit / cursor_to_str

Method cursor_to_str

crates/csskit/src/commands/tree.rs:79–82  ·  view source on GitHub ↗
(&self, cursor: Cursor)

Source from the content-addressed store, hash-verified

77 }
78
79 fn cursor_to_str(&self, cursor: Cursor) -> &str {
80 let span = cursor.to_span();
81 &self.source[span.start().0 as usize..span.end().0 as usize]
82 }
83
84 /// Find the index of the ancestor at the given depth, searching backwards from `start_idx`.
85 fn find_ancestor_at_depth(&self, start_idx: usize, target_depth: usize) -> Option<usize> {

Callers 1

build_displayMethod · 0.80

Calls 3

to_spanMethod · 0.45
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected