mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
working through clippy errors
This commit is contained in:
@@ -90,9 +90,10 @@ impl DataBlock {
|
||||
// (where n may be 0) have 1 more byte. Figure out where these start.
|
||||
let shorterBlocksTotalCodewords = result[0].codewords.len();
|
||||
let mut longerBlocksStartAt = result.len() - 1;
|
||||
while (longerBlocksStartAt >= 0) {
|
||||
loop {
|
||||
//while longerBlocksStartAt >= 0 {
|
||||
let numCodewords = result[longerBlocksStartAt].codewords.len();
|
||||
if (numCodewords == shorterBlocksTotalCodewords) {
|
||||
if numCodewords == shorterBlocksTotalCodewords {
|
||||
break;
|
||||
}
|
||||
longerBlocksStartAt-=1;
|
||||
|
||||
@@ -175,7 +175,7 @@ impl QRCodeReader {
|
||||
}
|
||||
let matrixWidth = ((right as f32 - left as f32 + 1.0) / moduleSize).round() as u32;
|
||||
let matrixHeight = ((bottom as f32 - top as f32 + 1.0) / moduleSize).round() as u32;
|
||||
if matrixWidth <= 0 || matrixHeight <= 0 {
|
||||
if matrixWidth == 0 || matrixHeight == 0 {
|
||||
return Err(Exceptions::NotFoundException("".to_owned()));
|
||||
}
|
||||
if matrixHeight != matrixWidth {
|
||||
|
||||
Reference in New Issue
Block a user