mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
refactor to use exception helper factories
This commit is contained in:
@@ -70,9 +70,7 @@ impl BitSource {
|
||||
*/
|
||||
pub fn readBits(&mut self, numBits: usize) -> Result<u32, Exceptions> {
|
||||
if !(1..=32).contains(&numBits) || numBits > self.available() {
|
||||
return Err(Exceptions::IllegalArgumentException(Some(
|
||||
numBits.to_string(),
|
||||
)));
|
||||
return Err(Exceptions::illegalArgument(numBits.to_string()));
|
||||
}
|
||||
|
||||
let mut result: u32 = 0;
|
||||
|
||||
Reference in New Issue
Block a user