-
Notifications
You must be signed in to change notification settings - Fork 355
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
Added implementation of timestamp key #431
Conversation
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.
looks good minus the assert
} | ||
} | ||
|
||
impl From<Timestamp> for TimestampKey { |
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.
nice
@@ -250,7 +250,8 @@ impl<T: Endian> From<T> for IntKey<T> { | |||
|
|||
impl<T: Endian> From<Vec<u8>> for IntKey<T> { | |||
fn from(wrap: Vec<u8>) -> Self { | |||
// TODO: assert proper length | |||
// TODO: Consider properly handling case, when `wrap` has length not conforming for the |
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.
Fair enough. Let's do look at TryFrom at some point...
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.
Solution here is in fact not to implement From
, and implement TryFrom
instead. That's what Rust std does.
Closes #419