mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
cargo clippy --fix
This commit is contained in:
@@ -209,8 +209,8 @@ impl BitMatrix {
|
||||
|
||||
#[inline(always)]
|
||||
fn get_offset(&self, y: u32, x: u32) -> usize {
|
||||
let offset = y as usize * self.row_size + (x as usize / 32);
|
||||
offset
|
||||
|
||||
y as usize * self.row_size + (x as usize / 32)
|
||||
}
|
||||
|
||||
pub fn try_get(&self, x: u32, y: u32) -> Result<bool, Exceptions> {
|
||||
|
||||
@@ -35,7 +35,7 @@ pub struct MonochromeRectangleDetector<'a> {
|
||||
|
||||
impl<'a> MonochromeRectangleDetector<'_> {
|
||||
pub fn new(image: &'a BitMatrix) -> MonochromeRectangleDetector<'a> {
|
||||
MonochromeRectangleDetector { image: image }
|
||||
MonochromeRectangleDetector { image }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,7 +81,7 @@ impl<'a> WhiteRectangleDetector<'_> {
|
||||
}
|
||||
|
||||
Ok(WhiteRectangleDetector {
|
||||
image: image,
|
||||
image,
|
||||
height: image.getHeight() as i32,
|
||||
width: image.getWidth() as i32,
|
||||
leftInit,
|
||||
|
||||
Reference in New Issue
Block a user