mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
refactor to use exception helper factories
This commit is contained in:
@@ -126,11 +126,10 @@ impl MaxiCodeReader {
|
||||
fn extractPureBits(image: &BitMatrix) -> Result<BitMatrix, Exceptions> {
|
||||
let enclosingRectangleOption = image.getEnclosingRectangle();
|
||||
if enclosingRectangleOption.is_none() {
|
||||
return Err(Exceptions::NotFoundException(None));
|
||||
return Err(Exceptions::notFoundEmpty());
|
||||
}
|
||||
|
||||
let enclosingRectangle =
|
||||
enclosingRectangleOption.ok_or(Exceptions::NotFoundException(None))?;
|
||||
let enclosingRectangle = enclosingRectangleOption.ok_or(Exceptions::notFoundEmpty())?;
|
||||
|
||||
let left = enclosingRectangle[0];
|
||||
let top = enclosingRectangle[1];
|
||||
|
||||
Reference in New Issue
Block a user