mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
Merge branch 'main' into pr/point_refactor
This commit is contained in:
@@ -203,13 +203,13 @@ impl<'a> MonochromeRectangleDetector<'_> {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return Err(Exceptions::NotFoundException(None));
|
||||
return Err(Exceptions::notFound);
|
||||
}
|
||||
lastRange_z = range;
|
||||
y += deltaY;
|
||||
x += deltaX
|
||||
}
|
||||
Err(Exceptions::NotFoundException(None))
|
||||
Err(Exceptions::notFound)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,7 +78,7 @@ impl<'a> WhiteRectangleDetector<'_> {
|
||||
|| downInit >= image.getHeight() as i32
|
||||
|| rightInit >= image.getWidth() as i32
|
||||
{
|
||||
return Err(Exceptions::NotFoundException(None));
|
||||
return Err(Exceptions::notFound);
|
||||
}
|
||||
|
||||
Ok(WhiteRectangleDetector {
|
||||
@@ -224,7 +224,7 @@ impl<'a> WhiteRectangleDetector<'_> {
|
||||
}
|
||||
|
||||
if z.is_none() {
|
||||
return Err(Exceptions::NotFoundException(None));
|
||||
return Err(Exceptions::notFound);
|
||||
}
|
||||
|
||||
let mut t: Option<Point> = None;
|
||||
@@ -242,7 +242,7 @@ impl<'a> WhiteRectangleDetector<'_> {
|
||||
}
|
||||
|
||||
if t.is_none() {
|
||||
return Err(Exceptions::NotFoundException(None));
|
||||
return Err(Exceptions::notFound);
|
||||
}
|
||||
|
||||
let mut x: Option<Point> = None;
|
||||
@@ -260,7 +260,7 @@ impl<'a> WhiteRectangleDetector<'_> {
|
||||
}
|
||||
|
||||
if x.is_none() {
|
||||
return Err(Exceptions::NotFoundException(None));
|
||||
return Err(Exceptions::notFound);
|
||||
}
|
||||
|
||||
let mut y: Option<Point> = None;
|
||||
@@ -278,12 +278,12 @@ impl<'a> WhiteRectangleDetector<'_> {
|
||||
}
|
||||
|
||||
if y.is_none() {
|
||||
return Err(Exceptions::NotFoundException(None));
|
||||
return Err(Exceptions::notFound);
|
||||
}
|
||||
|
||||
Ok(self.center_edges(y.unwrap(), z.unwrap(), x.unwrap(), t.unwrap()))
|
||||
} else {
|
||||
Err(Exceptions::NotFoundException(None))
|
||||
Err(Exceptions::notFound)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user