(&self, f: &mut std::fmt::Formatter<'_>)
| 262 | |
| 263 | impl std::fmt::Display for MemoryStoreError { |
| 264 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
| 265 | match self { |
| 266 | Self::NotFound(hash) => write!(f, "Change not found: {}", hash), |
| 267 | Self::OutOfBounds { start, end, len } => { |
| 268 | write!( |
| 269 | f, |
| 270 | "Byte range [{}, {}) out of bounds for content of length {}", |
| 271 | start, end, len |
| 272 | ) |
| 273 | } |
| 274 | Self::ChangeError(msg) => write!(f, "Change error: {}", msg), |
| 275 | } |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | impl std::error::Error for MemoryStoreError {} |