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

Function count_conflicts_in_path

atomic-core/src/output/alive/order.rs:263–277  ·  view source on GitHub ↗

Recursively count conflicts in a path.

(path: &ConflictPath)

Source from the content-addressed store, hash-verified

261
262/// Recursively count conflicts in a path.
263fn count_conflicts_in_path(path: &ConflictPath) -> usize {
264 let mut count = 0;
265 for element in &path.elements {
266 match element {
267 PathElement::Scc { .. } => {}
268 PathElement::Conflict { sides } => {
269 count += 1; // This conflict itself
270 for side in sides {
271 count += count_conflicts_in_path(side);
272 }
273 }
274 }
275 }
276 count
277}
278
279// ORDER RESULT
280

Callers 1

count_conflictsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected