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

bugfix: reader.read_bits_into cause slice length assert panic #8

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

Conversation

afpro
Copy link

@afpro afpro commented Dec 23, 2024

No description provided.

@afpro afpro changed the title bugfix: reader.read_bits_into cause slice length asset panic bugfix: reader.read_bits_into cause slice length assert panic Dec 23, 2024
Copy link
Owner

@mitinarseny mitinarseny left a comment

Choose a reason for hiding this comment

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

Hey, thanks a lot for fixing this!
I've added a small suggestion on code style, and I'm ready to merge

Comment on lines +327 to +329
let dst_fill_buf = &mut dst[..n];
let (v, rest) = self.split_at(n);
dst.copy_from_bitslice(v);
dst_fill_buf.copy_from_bitslice(v);
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
let dst_fill_buf = &mut dst[..n];
let (v, rest) = self.split_at(n);
dst.copy_from_bitslice(v);
dst_fill_buf.copy_from_bitslice(v);
let (v, rest) = self.split_at(n);
dst[..n].copy_from_bitslice(v);

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