Skip to content

Commit d45aece

Browse files
retragerbradford
authored andcommitted
fat, part: Fix non-string literal panic message
clippy says that `panic!(e)` is no longer accepted in Rust 2021. Signed-off-by: Akira Moroo <[email protected]>
1 parent 3a1c777 commit d45aece

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/fat.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ mod tests {
676676
Err(super::Error::EndOfFile) => {
677677
break;
678678
}
679-
Err(e) => panic!(e),
679+
Err(e) => panic!("{:?}", e),
680680
}
681681
}
682682

@@ -714,7 +714,7 @@ mod tests {
714714
Err(super::Error::EndOfFile) => {
715715
break;
716716
}
717-
Err(e) => panic!(e),
717+
Err(e) => panic!("{:?}", e),
718718
}
719719
}
720720

@@ -731,7 +731,7 @@ mod tests {
731731
Err(super::Error::EndOfFile) => {
732732
break;
733733
}
734-
Err(e) => panic!(e),
734+
Err(e) => panic!("{:?}", e),
735735
}
736736
}
737737

@@ -749,7 +749,7 @@ mod tests {
749749
Err(super::Error::EndOfFile) => {
750750
break;
751751
}
752-
Err(e) => panic!(e),
752+
Err(e) => panic!("{:?}", e),
753753
}
754754
}
755755
assert_eq!(bytes_so_far, f.size);
@@ -770,10 +770,10 @@ mod tests {
770770
assert_eq!(f.sectors, 1_046_528);
771771
assert_eq!(f.fat_type, super::FatType::FAT16);
772772
}
773-
Err(e) => panic!(e),
773+
Err(e) => panic!("{:?}", e),
774774
}
775775
}
776-
Err(e) => panic!(e),
776+
Err(e) => panic!("{:?}", e),
777777
}
778778
}
779779

@@ -789,10 +789,10 @@ mod tests {
789789
assert_eq!(file.active_cluster, 166);
790790
assert_eq!(file.size, 92789);
791791
}
792-
Err(e) => panic!(e),
792+
Err(e) => panic!("{:?}", e),
793793
}
794794
}
795-
Err(e) => panic!(e),
795+
Err(e) => panic!("{:?}", e),
796796
}
797797
}
798798

src/part.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pub mod tests {
199199
assert_eq!(start, 2048);
200200
assert_eq!(end, 1_048_575);
201201
}
202-
Err(e) => panic!(e),
202+
Err(e) => panic!("{:?}", e),
203203
}
204204
}
205205
}

0 commit comments

Comments
 (0)