-
Notifications
You must be signed in to change notification settings - Fork 9
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
Audit error types #31
Conversation
@@ -117,7 +117,7 @@ impl<'a> fmt::UpperHex for DisplayALittleBitHexy<'a> { | |||
} | |||
|
|||
/// Example Error. | |||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] | |||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | |||
pub enum Error { | |||
/// Conversion error while parsing hex string. | |||
Conversion(HexToBytesError), |
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.
I don't see InvalidStringFormat
below used anywhere is it still needed?
As for ordering |
Drats, I wish you were here a few months ago, I've made this change in so many places. I agree with you (on the ordering not the too much bikeshedding :) - FWIW when trying to come up with an order I went with You owe me one, for the shitstorm I'm going to get when I patch the whole org one Friday afternoon with this change. |
869994a
to
b7d3504
Compare
Lol! FWIW I really don't think it matters as long as they're beside each other. |
This is a text book case of "just have one way of doing it and do it like that ... for ever". Maybe I'm too stuck on this principle and too easily triggered, we all have weaknesses eh. |
Needs #33 to get past CI |
We are slowly settling on a few standards for error types, one of which is a standard set of derives. The errors in this crate are non-exhaustive so we should use: `Debug, Copy, Clone, PartialEq, Eq`.
Error conversion `from` can be inlined, it is a trivial wrap.
Remove the unnecessary `self::` from local use statement.
b7d3504
to
9d851d4
Compare
Yeah, not worth reverting, I was just curious about it. |
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.
ACK 9d851d4
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.
ACK 9d851d4
Audit the crate error types (all two of them) and ensure they follow the "standard" we are starting to settle on here in the rust-bitcoin org.