rename helper methods

This commit is contained in:
Vukašin Stepanović
2023-02-15 12:52:59 +00:00
parent bfcdb397ad
commit 935519ced5
133 changed files with 858 additions and 1044 deletions

View File

@@ -57,7 +57,7 @@ impl Reader for PDF417Reader {
) -> Result<crate::RXingResult, crate::Exceptions> {
let result = Self::decode(image, hints, false)?;
if result.is_empty() {
return Err(Exceptions::notFoundEmpty());
return Err(Exceptions::notFound);
}
Ok(result[0].clone())
}
@@ -127,7 +127,7 @@ impl PDF417Reader {
pdf417RXingResultMetadata
.clone()
.downcast::<PDF417RXingResultMetadata>()
.map_err(|_| Exceptions::illegalStateEmpty())?,
.map_err(|_| Exceptions::illegalState)?,
);
result.putMetadata(RXingResultMetadataType::PDF417_EXTRA_METADATA, data);
}