Build the display message for a version mismatch error.
(client_version: &str, server_version: Option<&str>)
| 157 | |
| 158 | /// Build the display message for a version mismatch error. |
| 159 | fn version_mismatch_message(client_version: &str, server_version: Option<&str>) -> String { |
| 160 | let server_line = match server_version { |
| 161 | Some(v) => format!("\n Server min-version: {v}"), |
| 162 | None => String::new(), |
| 163 | }; |
| 164 | format!( |
| 165 | "Failed to decode data from remote — the client and server may be running \ |
| 166 | incompatible versions.\n \ |
| 167 | Client version: {client_version}{server_line}\n \ |
| 168 | Hint: run 'atomic update' to upgrade, or ask the storage owner for their server version." |
| 169 | ) |
| 170 | } |
| 171 | |
| 172 | /// Format a list of hashes for display. |
| 173 | fn format_hashes(hashes: &[String]) -> String { |
nothing calls this directly
no outgoing calls
no test coverage detected