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

Method fmt

atomic-cli/src/commands/push/helpers.rs:108–137  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

106
107impl std::fmt::Display for ViewSyncConflict {
108 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
109 match self {
110 Self::Diverged {
111 first_mismatch,
112 local_len,
113 remote_len,
114 } => match first_mismatch {
115 Some(i) => write!(
116 f,
117 "remote log ({} changes) is not a prefix of local log ({} changes): \
118 first mismatch at position {}",
119 remote_len, local_len, i
120 ),
121 None => write!(
122 f,
123 "remote log ({} changes) is longer than local log ({} changes)",
124 remote_len, local_len
125 ),
126 },
127 Self::IdentityMismatch {
128 field,
129 local,
130 remote,
131 } => write!(
132 f,
133 "view {} differs: local '{}' vs remote '{}'",
134 field, local, remote
135 ),
136 }
137 }
138}
139
140/// Plan for syncing one view to the remote.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected