mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 20:32:34 +00:00
Use thiserror for error handling with less boilerplate
This commit is contained in:
@@ -103,7 +103,7 @@ impl Version {
|
||||
*/
|
||||
pub fn getVersionForDimensions(numRows: u32, numColumns: u32) -> Result<&'static Version> {
|
||||
if (numRows & 0x01) != 0 || (numColumns & 0x01) != 0 {
|
||||
return Err(Exceptions::format);
|
||||
return Err(Exceptions::FORMAT);
|
||||
}
|
||||
|
||||
for version in VERSIONS.iter() {
|
||||
@@ -112,7 +112,7 @@ impl Version {
|
||||
}
|
||||
}
|
||||
|
||||
Err(Exceptions::format)
|
||||
Err(Exceptions::FORMAT)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user