chore: cleanup some clippy errors

This commit is contained in:
Henry Schimke
2024-01-04 12:26:47 -06:00
parent 718b737877
commit d068c19fb8
3 changed files with 8 additions and 18 deletions

View File

@@ -337,8 +337,8 @@ fn testEncodeWithForcedCodeSetFailureCodeSetABadCharacter() {
#[test]
#[should_panic]
fn testEncodeWithForcedCodeSetFailureCodeSetBBadCharacter() {
let toEncode = "ASdf\00123"; // \0 (ascii value 0)
// Characters with ASCII value below 32 should not be accepted when the code set is forced to B.
let toEncode = "ASdf\x000123"; // \0 (ascii value 0)
// Characters with ASCII value below 32 should not be accepted when the code set is forced to B.
let mut hints = HashMap::new(); //new EnumMap<>(EncodeHintType.class);
hints.insert(

View File

@@ -244,12 +244,10 @@ mod TelepenWriterTestCase {
}
fn doTest(input: &str, expected: &str, numeric: bool) {
let result: BitMatrix;
if numeric {
result = encode_with_hints(input);
let result: BitMatrix = if numeric {
encode_with_hints(input)
} else {
result = encode(input);
encode(input)
};
assert_eq!(expected, bit_matrix_test_case::matrix_to_string(&result));