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

Method effective_change_count

atomic-objects/src/view_snapshot.rs:165–174  ·  view source on GitHub ↗

The size of the effective change set for a resolved ancestor chain (`chain[0]` = this view). Deduplicates across the chain.

(chain: &[&ViewSnapshot])

Source from the content-addressed store, hash-verified

163 /// The size of the effective change set for a resolved ancestor chain
164 /// (`chain[0]` = this view). Deduplicates across the chain.
165 pub fn effective_change_count(chain: &[&ViewSnapshot]) -> usize {
166 use std::collections::HashSet;
167 let mut seen: HashSet<&str> = HashSet::new();
168 for snap in chain {
169 for h in &snap.own_changes {
170 seen.insert(h.as_str());
171 }
172 }
173 seen.len()
174 }
175
176 /// Render the legacy tab-separated manifest text this snapshot represents,
177 /// for the transitional `?view-manifest` compatibility path. New code

Callers

nothing calls this directly

Calls 3

insertMethod · 0.45
as_strMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected