-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
fix clippy #2588
base: main
Are you sure you want to change the base?
fix clippy #2588
Conversation
ef87e56
to
b01b8e0
Compare
@@ -48,7 +48,7 @@ impl BitPacker { | |||
|
|||
pub fn flush<TWrite: io::Write + ?Sized>(&mut self, output: &mut TWrite) -> io::Result<()> { | |||
if self.mini_buffer_written > 0 { | |||
let num_bytes = (self.mini_buffer_written + 7) / 8; | |||
let num_bytes = self.mini_buffer_written.div_ceil(8); |
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.
Here it does not matter, but this has a small micro impact on performance.
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.
ah good to know, I thought it would lead to the same instruction
bitpacker/src/bitpacker.rs
Outdated
@@ -65,7 +65,7 @@ impl BitPacker { | |||
|
|||
#[derive(Clone, Debug, Default, Copy)] | |||
pub struct BitUnpacker { | |||
num_bits: usize, | |||
num_bits: u32, |
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.
why?
bitpacker/src/blocked_bitpacker.rs
Outdated
@@ -34,7 +34,7 @@ struct BlockedBitpackerEntryMetaData { | |||
|
|||
impl BlockedBitpackerEntryMetaData { | |||
fn new(offset: u64, num_bits: u8, base_value: u64) -> Self { | |||
let encoded = offset | (u64::from(num_bits) << (64 - 8)); | |||
let encoded = offset | ((num_bits as u64) << (64 - 8)); |
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.
?
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 think part of this PR is obsolete. Probably a failed rebase?
Yes, a failed rebase. I restarted from scratch instead |
No description provided.