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 | "document-features", | 1800 | "document-features", |
| 1801 | "gix-actor 0.17.2", | 1801 | "gix-actor 0.17.2", |
| 1802 | "gix-testtools", | 1802 | "gix-testtools", |
| 1803 | "quick-error 2.0.1", | ||
| 1804 | "serde", | 1803 | "serde", |
| 1804 | "thiserror", | ||
| 1805 | ] | 1805 | ] |
| 1806 | 1806 | ||
| 1807 | [[package]] | 1807 | [[package]] |
| @@ -18,7 +18,7 @@ serde1 = ["serde", "bstr/serde", "gix-actor/serde1"] · 17 unmodified lines | |||
| 18 | [dependencies] | 18 | [dependencies] |
| 19 | gix-actor = { version = "^0.17.2", path = "../gix-actor" } | 19 | gix-actor = { version = "^0.17.2", path = "../gix-actor" } |
| 20 | bstr = { version = "1.3.0", default-features = false, features = ["std", "unicode"]} | 20 | bstr = { version = "1.3.0", default-features = false, features = ["std", "unicode"]} |
| 21 | quick-error = "2.0.0" | 21 | thiserror = "1.0.38" |
| 22 | serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"]} | 22 | serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"]} |
| 23 | 23 | ||
| 24 | document-features = { version = "0.2.0", optional = true } | 24 | document-features = { version = "0.2.0", optional = true } |
| @@ -1,19 +1,18 @@ | |||
| 1 | mod error { | 1 | mod error { |
| 2 | use bstr::BString; | 2 | use bstr::BString; |
| 3 | use quick_error::quick_error; | ||
| 4 | 3 | ||
| 5 | quick_error! { | 4 | /// The error returned by [`parse()`][crate::parse()]. |
| 6 | /// The error returned by [`parse()`][crate::parse()]. | 5 | #[derive(Debug, thiserror::Error)] |
| 7 | #[derive(Debug)] | 6 | #[allow(missing_docs)] |
| 8 | #[allow(missing_docs)] | 7 | pub enum Error { |
| 9 | pub enum Error { | 8 | #[error("Line {line_number} has too many names or emails, or none at all: {line:?}")] |
| 10 | UnconsumedInput { line_number: usize, line: BString } { | 9 | UnconsumedInput { line_number: usize, line: BString }, |
| 11 | display("Line {} has too many names or emails, or none at all: {}", line_number, line) | 10 | #[error("{line_number}: {line:?}: {message}")] |
| 12 | } | 11 | Malformed { |
| 13 | Malformed { line_number: usize, line: BString, message: String } { | 12 | line_number: usize, |
| 14 | display("{}: {:?}: {}", line_number, line, message) | 13 | line: BString, |
| 15 | } | 14 | message: String, |
| 16 | } | 15 | }, |
| 17 | } | 16 | } |
| 18 | } | 17 | } |
| 19 | 18 | ||