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

Function insert_conflict_entries

atomic-cli/src/commands/rpc.rs:4024–4038  ·  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

4022/// The inline conflicted-file entries off the response's listing (the
4023/// first record's line per file, in listing order).
4024fn insert_conflict_entries(
4025 response: &pb::InsertChangesResponse,
4026) -> Vec<super::insert::ConflictSummaryEntry> {
4027 let mut entries: Vec<super::insert::ConflictSummaryEntry> = Vec::new();
4028 for conflict in &response.conflicts {
4029 if entries.iter().any(|entry| entry.path == conflict.path) {
4030 continue;
4031 }
4032 entries.push(super::insert::ConflictSummaryEntry {
4033 path: conflict.path.clone(),
4034 line: conflict.line.map(|line| line as u32),
4035 });
4036 }
4037 entries
4038}
4039
4040/// The local materialization report line + inline conflict summary over
4041/// 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