Implement clippy suggestions

This commit is contained in:
Henry Schimke
2023-01-04 14:48:16 -06:00
parent c65eadf102
commit 48287631dd
196 changed files with 2465 additions and 2574 deletions

View File

@@ -50,7 +50,7 @@ impl Decoder {
* @throws ChecksumException if error correction fails
*/
pub fn decode_bools(&self, image: &Vec<Vec<bool>>) -> Result<DecoderRXingResult, Exceptions> {
self.decode(&BitMatrix::parse_bools(&image))
self.decode(&BitMatrix::parse_bools(image))
}
/**
@@ -72,7 +72,7 @@ impl Decoder {
let version = parser.getVersion();
// Separate into data blocks
let dataBlocks = DataBlock::getDataBlocks(&codewords, &version)?;
let dataBlocks = DataBlock::getDataBlocks(&codewords, version)?;
// Count total number of data bytes
let mut totalBytes = 0;
@@ -140,3 +140,9 @@ impl Decoder {
Ok(())
}
}
impl Default for Decoder {
fn default() -> Self {
Self::new()
}
}