refactor to use common result type

This commit is contained in:
Vukašin Stepanović
2023-02-14 22:56:03 +00:00
parent 145cf704fe
commit 8ee616d96b
160 changed files with 829 additions and 901 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
use crate::Exceptions;
use crate::common::Result;
use super::ErrorCorrectionLevel;
@@ -73,7 +73,7 @@ pub struct FormatInformation {
}
impl FormatInformation {
fn new(format_info: u8) -> Result<Self, Exceptions> {
fn new(format_info: u8) -> Result<Self> {
// Bits 3,4
let errorCorrectionLevel = ErrorCorrectionLevel::forBits((format_info >> 3) & 0x03)?;
// Bottom 3 bits