(&self, f: &mut std::fmt::Formatter<'_>)
| 106 | |
| 107 | impl 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. |
nothing calls this directly
no outgoing calls
no test coverage detected