mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
updated cargo fmt
This commit is contained in:
@@ -49,8 +49,10 @@ pub const WORD_SIZE: [u32; 33] = [
|
||||
* @return Aztec symbol matrix with metadata
|
||||
*/
|
||||
pub fn encode_simple(data: &str) -> Result<AztecCode> {
|
||||
let Ok(bytes) =CharacterSet::ISO8859_1.encode_replace(data) else {
|
||||
return Err(Exceptions::illegal_argument_with(format!("'{data}' cannot be encoded as ISO_8859_1")));
|
||||
let Ok(bytes) = CharacterSet::ISO8859_1.encode_replace(data) else {
|
||||
return Err(Exceptions::illegal_argument_with(format!(
|
||||
"'{data}' cannot be encoded as ISO_8859_1"
|
||||
)));
|
||||
};
|
||||
encode_bytes_simple(&bytes)
|
||||
}
|
||||
|
||||
@@ -86,11 +86,9 @@ impl State {
|
||||
));
|
||||
// throw new IllegalArgumentException("ECI code must be between 0 and 999999");
|
||||
} else {
|
||||
let Ok(eci_digits) = CharacterSet::ISO8859_1
|
||||
.encode(&format!("{eci}"))
|
||||
else {
|
||||
return Err(Exceptions::ILLEGAL_ARGUMENT)
|
||||
};
|
||||
let Ok(eci_digits) = CharacterSet::ISO8859_1.encode(&format!("{eci}")) else {
|
||||
return Err(Exceptions::ILLEGAL_ARGUMENT);
|
||||
};
|
||||
// let eciDigits = Integer.toString(eci).getBytes(StandardCharsets.ISO_8859_1);
|
||||
token.add(eci_digits.len() as i32, 3); // 1-6: number of ECI digits
|
||||
for eci_digit in &eci_digits {
|
||||
|
||||
Reference in New Issue
Block a user