Upgrade usage of format! and Default

This commit is contained in:
A. Molzer committed 2025-07-14 19:56:06 +02:00
1 parent 23672b2490
commit f6a762b72c
5 files changed
+9 -13

No files matched your search

+3 -3
View File
@@ -348,7 +348,7 @@ fn test_div_zero() {
match err {
TiffError::FormatError(TiffFormatError::StripTileTagConflict) => {}
unexpected => panic!("Unexpected error {}", unexpected),
unexpected => panic!("Unexpected error {unexpected}"),
}
}
@@ -366,7 +366,7 @@ fn test_too_many_value_bytes() {
match error {
tiff::TiffError::LimitsExceeded => {}
unexpected => panic!("Unexpected error {}", unexpected),
unexpected => panic!("Unexpected error {unexpected}"),
}
}
@@ -497,7 +497,7 @@ fn timeout() {
match error {
TiffError::FormatError(TiffFormatError::CycleInOffsets) => {}
e => panic!("Unexpected error {:?}", e),
e => panic!("Unexpected error {e:?}"),
}
}
+1 -1
View File
@@ -621,7 +621,7 @@ fn test_rows_per_strip() {
let img2 = [i; 2 * 100];
match decoder.read_chunk(i as u32).unwrap() {
DecodingResult::U8(data) => assert_eq!(&img2[..], &data[..]),
other => panic!("Incorrect strip type {:?}", other),
other => panic!("Incorrect strip type {other:?}"),
}
}
}
+2 -2
View File
@@ -116,7 +116,7 @@ fn encode_decode_with_compression(compression: Compression) {
assert_eq!(
match decoder.read_image() {
Ok(DecodingResult::U16(image_data)) => image_data,
unexpected => panic!("Descoding RGB failed: {:?}", unexpected),
unexpected => panic!("Descoding RGB failed: {unexpected:?}"),
},
image_rgb.reference_data()
);
@@ -126,7 +126,7 @@ fn encode_decode_with_compression(compression: Compression) {
assert_eq!(
match decoder.read_image() {
Ok(DecodingResult::U8(image_data)) => image_data,
unexpected => panic!("Decoding grayscale failed: {:?}", unexpected),
unexpected => panic!("Decoding grayscale failed: {unexpected:?}"),
},
image_grayscale.reference_data()
);