mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 20:32:34 +00:00
Update macro and cargo fmt
This commit is contained in:
@@ -152,7 +152,9 @@ impl BitMatrix {
|
||||
first_run = false;
|
||||
rowLength = bitsPos - rowStartPos;
|
||||
} else if bitsPos - rowStartPos != rowLength {
|
||||
return Err(Exceptions::illegal_argument_with("row lengths do not match"));
|
||||
return Err(Exceptions::illegal_argument_with(
|
||||
"row lengths do not match",
|
||||
));
|
||||
}
|
||||
rowStartPos = bitsPos;
|
||||
nRows += 1;
|
||||
@@ -181,7 +183,9 @@ impl BitMatrix {
|
||||
// first_run = false;
|
||||
rowLength = bitsPos - rowStartPos;
|
||||
} else if bitsPos - rowStartPos != rowLength {
|
||||
return Err(Exceptions::illegal_argument_with("row lengths do not match"));
|
||||
return Err(Exceptions::illegal_argument_with(
|
||||
"row lengths do not match",
|
||||
));
|
||||
}
|
||||
nRows += 1;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,9 @@ impl ReedSolomonEncoder {
|
||||
|
||||
pub fn encode(&mut self, to_encode: &mut Vec<i32>, ec_bytes: usize) -> Result<()> {
|
||||
if ec_bytes == 0 {
|
||||
return Err(Exceptions::illegal_argument_with("No error correction bytes"));
|
||||
return Err(Exceptions::illegal_argument_with(
|
||||
"No error correction bytes",
|
||||
));
|
||||
}
|
||||
let data_bytes = to_encode.len() - ec_bytes;
|
||||
if data_bytes == 0 {
|
||||
|
||||
Reference in New Issue
Block a user