Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix clippy #2588

wants to merge 1 commit into from

Conversation

PSeitz
Copy link
Contributor

@PSeitz PSeitz commented Feb 25, 2025

No description provided.

@PSeitz PSeitz force-pushed the clippy branch 2 times, most recently from ef87e56 to b01b8e0 Compare March 7, 2025 13:31
@@ -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);
Copy link
Collaborator

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.

Copy link
Contributor Author

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

@@ -65,7 +65,7 @@ impl BitPacker {

#[derive(Clone, Debug, Default, Copy)]
pub struct BitUnpacker {
num_bits: usize,
num_bits: u32,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

@@ -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));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Collaborator

@fulmicoton fulmicoton left a 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?

@PSeitz
Copy link
Contributor Author

PSeitz commented Mar 7, 2025

I think part of this PR is obsolete. Probably a failed rebase?

Yes, a failed rebase. I restarted from scratch instead

@PSeitz PSeitz requested a review from fulmicoton March 7, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants