-
Notifications
You must be signed in to change notification settings - Fork 93
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
Impl Decode/Encode for Range/RangeInclusive #269
Conversation
src/codec.rs
Outdated
#[inline] | ||
fn size_hint(&self) -> usize { | ||
2 * mem::size_of::<T>() | ||
} | ||
|
||
#[inline] |
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.
#[inline] | |
fn size_hint(&self) -> usize { | |
2 * mem::size_of::<T>() | |
} | |
#[inline] | |
fn size_hint(&self) -> usize { | |
2 * mem::size_of::<T>() | |
} | |
src/codec.rs
Outdated
#[inline] | ||
fn size_hint(&self) -> usize { | ||
2 * mem::size_of::<T>() | ||
} | ||
|
||
#[inline] | ||
fn encode(&self) -> Vec<u8> { | ||
(self.start(), self.end()).encode() | ||
} |
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.
#[inline] | |
fn size_hint(&self) -> usize { | |
2 * mem::size_of::<T>() | |
} | |
#[inline] | |
fn encode(&self) -> Vec<u8> { | |
(self.start(), self.end()).encode() | |
} | |
fn size_hint(&self) -> usize { | |
2 * mem::size_of::<T>() | |
} | |
fn encode(&self) -> Vec<u8> { | |
(self.start(), self.end()).encode() | |
} |
These functions are trivial one-line code candidates for |
I know what |
Feel free to specify another deserialization/serialization format like
(T, '=', T)
if desirable.