mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
fixed clippy errors
This commit is contained in:
@@ -2342,7 +2342,7 @@ impl GridSampler for DefaultGridSampler {
|
||||
dimensionY: u32,
|
||||
transform: &PerspectiveTransform,
|
||||
) -> Result<BitMatrix, Exceptions> {
|
||||
if dimensionX <= 0 || dimensionY <= 0 {
|
||||
if dimensionX == 0 || dimensionY == 0 {
|
||||
return Err(Exceptions::NotFoundException(
|
||||
"getNotFoundInstance".to_owned(),
|
||||
));
|
||||
@@ -3227,7 +3227,7 @@ impl ECIInput for MinimalECIInput {
|
||||
if index >= self.length() as u32 {
|
||||
return Err(Exceptions::IndexOutOfBoundsException(index.to_string()));
|
||||
}
|
||||
Ok(self.bytes[index as usize] > 255 && self.bytes[index as usize] <= u16::MAX)
|
||||
Ok(self.bytes[index as usize] > 255)// && self.bytes[index as usize] <= u16::MAX)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -967,7 +967,7 @@ impl ReedSolomonEncoder {
|
||||
));
|
||||
}
|
||||
let data_bytes = to_encode.len() - ec_bytes;
|
||||
if data_bytes <= 0 {
|
||||
if data_bytes == 0 {
|
||||
return Err(Exceptions::IllegalArgumentException(
|
||||
"No data bytes provided".to_owned(),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user