This increases the compile time of the crate alone if there is no proc-macro in the dependency tree, but will ever so slightly improve compile times for `gix` as a whole.
Unified · Split
| @@ -1800,8 +1800,8 @@ dependencies = [ · 1799 unmodified lines | ||
| 1800 | 1800 | "document-features", |
| 1801 | 1801 | "gix-actor 0.17.2", |
| 1802 | 1802 | "gix-testtools", |
| 1803 | − "quick-error 2.0.1", | |
| 1804 | 1803 | "serde", |
| 1804 | + "thiserror", | |
| 1805 | 1805 | ] |
| 1806 | 1806 | |
| 1807 | 1807 | [[package]] |
| @@ -18,7 +18,7 @@ serde1 = ["serde", "bstr/serde", "gix-actor/serde1"] · 17 unmodified lines | ||
| 18 | 18 | [dependencies] |
| 19 | 19 | gix-actor = { version = "^0.17.2", path = "../gix-actor" } |
| 20 | 20 | bstr = { version = "1.3.0", default-features = false, features = ["std", "unicode"]} |
| 21 | −quick-error = "2.0.0" | |
| 21 | +thiserror = "1.0.38" | |
| 22 | 22 | serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"]} |
| 23 | 23 | |
| 24 | 24 | document-features = { version = "0.2.0", optional = true } |
| @@ -1,19 +1,18 @@ | ||
| 1 | 1 | mod error { |
| 2 | 2 | use bstr::BString; |
| 3 | − use quick_error::quick_error; | |
| 4 | 3 | |
| 5 | − quick_error! { | |
| 6 | − /// The error returned by [`parse()`][crate::parse()]. | |
| 7 | − #[derive(Debug)] | |
| 8 | − #[allow(missing_docs)] | |
| 9 | − pub enum Error { | |
| 10 | − UnconsumedInput { line_number: usize, line: BString } { | |
| 11 | − display("Line {} has too many names or emails, or none at all: {}", line_number, line) | |
| 12 | − } | |
| 13 | − Malformed { line_number: usize, line: BString, message: String } { | |
| 14 | − display("{}: {:?}: {}", line_number, line, message) | |
| 15 | − } | |
| 16 | − } | |
| 4 | + /// The error returned by [`parse()`][crate::parse()]. | |
| 5 | + #[derive(Debug, thiserror::Error)] | |
| 6 | + #[allow(missing_docs)] | |
| 7 | + pub enum Error { | |
| 8 | + #[error("Line {line_number} has too many names or emails, or none at all: {line:?}")] | |
| 9 | + UnconsumedInput { line_number: usize, line: BString }, | |
| 10 | + #[error("{line_number}: {line:?}: {message}")] | |
| 11 | + Malformed { | |
| 12 | + line_number: usize, | |
| 13 | + line: BString, | |
| 14 | + message: String, | |
| 15 | + }, | |
| 17 | 16 | } |
| 18 | 17 | } |
| 19 | 18 | |