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: don't warn on useless conversions when the count value is already a usize #206

Closed
wants to merge 2 commits into from

Conversation

poliorcetics
Copy link
Contributor

  • nit: fix doc comment that applied to use and not module
  • fix: don't warn on useless conversions when the value is already a usize

Example code to reproduce the issue: (run cargo clippy)

const LEN: usize = 42;

#[derive(binrw::BinRead)]
struct Data {
    #[br(count = LEN)]
    data: Vec<u8>,
}

@csnover csnover closed this in bc9c22c Jun 29, 2023
@csnover
Copy link
Collaborator

csnover commented Jun 29, 2023

Thank you for your PR, and sorry for the delay! I modified your patch slightly to add the example code as a test so this will not regress later, and to make the summary fit the convention used by this project. This will be fixed in the next release.

@poliorcetics poliorcetics deleted the patch-1 branch July 13, 2023 09:09
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.

None yet

2 participants