cargo clippy && fmt

This commit is contained in:
Henry Schimke
2023-03-02 15:54:40 -06:00
parent a0b8b68869
commit 9431031147
28 changed files with 111 additions and 135 deletions

View File

@@ -203,8 +203,7 @@ fn decodeHanziSegment(bits: &mut BitSource, result: &mut String, count: usize) -
count -= 1;
}
let gb_encoder =
CharacterSetECI::GB18030;
let gb_encoder = CharacterSetECI::GB18030;
let encode_string = gb_encoder
.decode(&buffer)
.map_err(|e| Exceptions::parse_with(format!("unable to decode buffer {buffer:?}: {e}")))?;
@@ -321,13 +320,9 @@ fn decodeByteSegment(
// )
};
let encode_string =
encoding
.decode(&readBytes)
.map_err(|e| {
Exceptions::parse_with(format!("unable to decode buffer {readBytes:?}: {e}"))
})?
;
let encode_string = encoding.decode(&readBytes).map_err(|e| {
Exceptions::parse_with(format!("unable to decode buffer {readBytes:?}: {e}"))
})?;
result.push_str(&encode_string);
byteSegments.push(readBytes);