Closed brxken128 closed 1 year ago
Thank you for the patch and sorry for the delay! Since panicking is a very unpleasant thing to do, I’ve implemented an alternative approach that eliminates any panicking unwrap entirely by returning an error for out-of-range count values instead, in #198. Give it a try and let me know how it works!
Currently, when using
#[br(count = x)]
above a field in astruct
, clippy will complain thatunwrap
is being used (within the macro). No variation of#[allow()]
seemed to silence the problem.This happens because
#![warn(clippy::unwrap_used)]
is being used throughout the crate I'm working on - it's annoying but helps catch some (potential) issues, so I figure a fix here will likely be the best solution (and hopefully prevent this issue happening to others, too).