MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / insert

Method insert

src/path_tree.rs:12–25  ·  view source on GitHub ↗
(&mut self, path: &str, suffix: &str)

Source from the content-addressed store, hash-verified

10
11impl PathNode {
12 fn insert(&mut self, path: &str, suffix: &str) {
13 let mut node = self;
14 let mut inserted = false;
15 for part in path
16 .split(['/', '\\'])
17 .filter(|part| !part.is_empty() && *part != ".")
18 {
19 inserted = true;
20 node = node.children.entry(part.to_string()).or_default();
21 }
22 if inserted {
23 node.suffix = Some(suffix.to_string());
24 }
25 }
26}
27
28pub(crate) fn format_compact_path_list<'a>(

Callers 15

push_recent_updateFunction · 0.80
compute_shinglesFunction · 0.80
parse_log_fieldsFunction · 0.80
recent_watcher_eventsFunction · 0.80
project_serverMethod · 0.80
with_db_fileMethod · 0.80

Calls 2

entryMethod · 0.80
is_emptyMethod · 0.45