diff options
| author | Igor Tolmachev <me@igorek.dev> | 2024-06-21 02:11:16 +0900 |
|---|---|---|
| committer | Igor Tolmachev <me@igorek.dev> | 2024-06-23 15:34:35 +0900 |
| commit | afb8ab448949eb19e09e1bdb4b263dc487a9be21 (patch) | |
| tree | 5806bc9bc566dcda64818917a222c313dde3cb55 /src/error.rs | |
| parent | d6055b5ac4f3ff5016bc4881cf1cc109a22c40ba (diff) | |
| download | archivator-afb8ab448949eb19e09e1bdb4b263dc487a9be21.tar.gz archivator-afb8ab448949eb19e09e1bdb4b263dc487a9be21.zip | |
Implement deserialize
Remove bincode crate and replace it by own written serializer
Diffstat (limited to 'src/error.rs')
| -rw-r--r-- | src/error.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/error.rs b/src/error.rs index 9252762..7172d04 100644 --- a/src/error.rs +++ b/src/error.rs | |||
| @@ -27,15 +27,7 @@ impl<E: Error> Display for ArchiveError<E> { | |||
| 27 | } | 27 | } |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | impl<E: Error> Error for ArchiveError<E> { | 30 | impl<E: Error> Error for ArchiveError<E> {} |
| 31 | fn source(&self) -> Option<&(dyn Error + 'static)> { | ||
| 32 | match self { | ||
| 33 | Self::IO { error } => Some(error), | ||
| 34 | Self::Serde { .. } => None, | ||
| 35 | Self::Archivator { module, error } => None, | ||
| 36 | } | ||
| 37 | } | ||
| 38 | } | ||
| 39 | 31 | ||
| 40 | impl<E: Error> serde::ser::Error for ArchiveError<E> { | 32 | impl<E: Error> serde::ser::Error for ArchiveError<E> { |
| 41 | fn custom<T: Display>(msg: T) -> Self { | 33 | fn custom<T: Display>(msg: T) -> Self { |
