mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
Use thiserror for error handling with less boilerplate
This commit is contained in:
@@ -71,7 +71,7 @@ impl BitSource {
|
||||
*/
|
||||
pub fn readBits(&mut self, numBits: usize) -> Result<u32> {
|
||||
if !(1..=32).contains(&numBits) || numBits > self.available() {
|
||||
return Err(Exceptions::illegalArgumentWith(numBits.to_string()));
|
||||
return Err(Exceptions::illegal_argument_with(numBits.to_string()));
|
||||
}
|
||||
|
||||
let mut result: u32 = 0;
|
||||
|
||||
Reference in New Issue
Block a user