From fc76d6603fa354386de8590368ab10881cbd949e Mon Sep 17 00:00:00 2001 From: nymius <155548262+nymius@users.noreply.github.com> Date: Tue, 12 Nov 2024 16:29:41 -0300 Subject: [PATCH] feat(store): add `Bincode` error variant to FileError enum --- crates/file_store/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/file_store/src/lib.rs b/crates/file_store/src/lib.rs index 7c943ca2..dfe5c5c6 100644 --- a/crates/file_store/src/lib.rs +++ b/crates/file_store/src/lib.rs @@ -18,6 +18,8 @@ pub enum FileError { Io(io::Error), /// Magic bytes do not match what is expected. InvalidMagicBytes { got: Vec, expected: Vec }, + /// Failure to decode data from the file. + Bincode(bincode::ErrorKind), } impl core::fmt::Display for FileError { @@ -29,6 +31,7 @@ impl core::fmt::Display for FileError { "file has invalid magic bytes: expected={:?} got={:?}", expected, got, ), + Self::Bincode(e) => write!(f, "bincode error while reading entry {}", e), } } } -- 2.49.0