(&self, f: &mut std::fmt::Formatter<'_>)
| 286 | |
| 287 | impl std::fmt::Display for MemoryStoreError { |
| 288 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
| 289 | match self { |
| 290 | Self::NotFound(hash) => write!(f, "Change not found: {}", hash), |
| 291 | Self::OutOfBounds { start, end, len } => { |
| 292 | write!( |
| 293 | f, |
| 294 | "Byte range [{}, {}) out of bounds for content of length {}", |
| 295 | start, end, len |
| 296 | ) |
| 297 | } |
| 298 | Self::ChangeError(msg) => write!(f, "Change error: {}", msg), |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | impl std::error::Error for MemoryStoreError {} |