-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ParseError
a real Error
enum
#161
Conversation
Interesting. The new CI test with |
Found a workaround: package without verification, extract to a directory with vendored crates, verify against vendored instead of crates.io. Thanks to rust-lang/cargo#1169 (comment). |
chrono-tz-build/src/lib.rs
Outdated
#[cfg(not(feature = \"std\"))] | ||
pub type ParseError = &'static str; | ||
r#"#[derive(Copy, Clone, Debug, PartialEq, Eq)] | ||
pub struct ParseError; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do ParseError(())
to avoid it being constructed by external callers?
chrono-tz/Cargo.toml
Outdated
@@ -42,7 +42,7 @@ filter-by-regex = ["chrono-tz-build/filter-by-regex"] | |||
case-insensitive = ["dep:uncased", "chrono-tz-build/case-insensitive", "phf/uncased"] | |||
|
|||
[build-dependencies] | |||
chrono-tz-build = { path = "../chrono-tz-build", version = "0.2.1" } | |||
chrono-tz-build = { path = "../chrono-tz-build", version = "0.3.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: just use 0.3
here.
I'll wait with merging to make #162 part of the new versions. |
Published 🎉. |
To continue #122 by @laralove143.
I added a second error type that is used when deserializing, which can borrow the input string and print a nice message (without needing to allocate).
Fixes @121.