Removed unused functions and make InvalidChunkIndex a UsageError

This commit is contained in:
Alan Race committed 2022-07-08 11:08:30 +02:00
1 parent 8c0c13f022
commit e1f4161e0b
5 files changed
+21 -95

No files matched your search

+2 -2
View File
@@ -275,8 +275,8 @@ fn test_tiled_incremental() {
assert_eq!(tiles as usize, sums.len());
for tile in 0..tiles {
match decoder.read_chunk().unwrap() {
DecodingResult::U8(res) => {
match decoder.read_chunk_at(tile as usize).unwrap() {
(DecodingResult::U8(res), _) => {
let sum: u64 = res.into_iter().map(<u64>::from).sum();
assert_eq!(sum, sums[tile as usize]);
}
+2 -2
View File
@@ -512,8 +512,8 @@ fn test_rows_per_strip() {
for i in 0..50 {
let img2 = [i; 2 * 100];
match decoder.read_chunk().unwrap() {
DecodingResult::U8(data) => assert_eq!(&img2[..], &data[..]),
match decoder.read_chunk_at(i as usize).unwrap() {
(DecodingResult::U8(data), _) => assert_eq!(&img2[..], &data[..]),
other => panic!("Incorrect strip type {:?}", other),
}
}