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

Function insert_conflict_entries

atomic-cli/src/commands/rpc.rs:3990–4004  ·  view source on GitHub ↗

The inline conflicted-file entries off the response's listing (the first record's line per file, in listing order).

(
    response: &pb::InsertChangesResponse,
)

Source from the content-addressed store, hash-verified

3988/// The inline conflicted-file entries off the response's listing (the
3989/// first record's line per file, in listing order).
3990fn insert_conflict_entries(
3991 response: &pb::InsertChangesResponse,
3992) -> Vec<super::insert::ConflictSummaryEntry> {
3993 let mut entries: Vec<super::insert::ConflictSummaryEntry> = Vec::new();
3994 for conflict in &response.conflicts {
3995 if entries.iter().any(|entry| entry.path == conflict.path) {
3996 continue;
3997 }
3998 entries.push(super::insert::ConflictSummaryEntry {
3999 path: conflict.path.clone(),
4000 line: conflict.line.map(|line| line as u32),
4001 });
4002 }
4003 entries
4004}
4005
4006/// The local materialization report line + inline conflict summary over
4007/// the wire-carried counts — rendered with the same output functions the

Callers 1

print_insert_refreshFunction · 0.85

Calls 3

iterMethod · 0.45
pushMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected