Unified · Split
| @@ -1,15 +1,11 @@ | ||
| 1 | 1 | use crate::loose::Db; |
| 2 | 2 | use git_object::owned; |
| 3 | −use quick_error::quick_error; | |
| 4 | 3 | use walkdir::WalkDir; |
| 5 | 4 | |
| 6 | −quick_error! { | |
| 7 | − #[derive(Debug)] | |
| 8 | − pub enum Error { | |
| 9 | − WalkDir(err: walkdir::Error) { | |
| 10 | − source(err) | |
| 11 | − } | |
| 12 | − } | |
| 5 | +#[derive(thiserror::Error, Debug)] | |
| 6 | +pub enum Error { | |
| 7 | + #[error(transparent)] | |
| 8 | + WalkDir(#[from] walkdir::Error), | |
| 13 | 9 | } |
| 14 | 10 | |
| 15 | 11 | /// Iteration and traversal |
| @@ -1,21 +1,13 @@ | ||
| 1 | 1 | use super::Status; |
| 2 | 2 | use miniz_oxide::{deflate, deflate::core::CompressorOxide, MZError, MZFlush, MZStatus}; |
| 3 | −use quick_error::quick_error; | |
| 4 | 3 | use std::io; |
| 5 | 4 | |
| 6 | −quick_error! { | |
| 7 | − #[derive(Debug)] | |
| 8 | − pub enum Error { | |
| 9 | − Compression { | |
| 10 | − display("The compression failed due to an unknown error") | |
| 11 | − } | |
| 12 | − ZLibNeedDict { | |
| 13 | − display("Need dictionary") | |
| 14 | − } | |
| 15 | − Error(err: MZError) { | |
| 16 | − display("A compression error occurred: {:?}", err) | |
| 17 | − } | |
| 18 | − } | |
| 5 | +#[derive(thiserror::Error, Debug)] | |
| 6 | +pub enum Error { | |
| 7 | + #[error("Need dictionary")] | |
| 8 | + ZLibNeedDict, | |
| 9 | + #[error("A compression error occurred: {0:?}")] | |
| 10 | + Error(MZError), | |
| 19 | 11 | } |
| 20 | 12 | |
| 21 | 13 | pub struct Deflate { |