Skip to content

Commit

Permalink
fat, part: Fix non-string literal panic message
Browse files Browse the repository at this point in the history
clippy says that `panic!(e)` is no longer accepted in Rust 2021.

Signed-off-by: Akira Moroo <[email protected]>
  • Loading branch information
retrage committed Mar 5, 2021
1 parent 7159305 commit ba1e9f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/fat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ mod tests {
Err(super::Error::EndOfFile) => {
break;
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}

Expand Down Expand Up @@ -714,7 +714,7 @@ mod tests {
Err(super::Error::EndOfFile) => {
break;
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}

Expand All @@ -731,7 +731,7 @@ mod tests {
Err(super::Error::EndOfFile) => {
break;
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}

Expand All @@ -749,7 +749,7 @@ mod tests {
Err(super::Error::EndOfFile) => {
break;
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}
assert_eq!(bytes_so_far, f.size);
Expand All @@ -770,10 +770,10 @@ mod tests {
assert_eq!(f.sectors, 1_046_528);
assert_eq!(f.fat_type, super::FatType::FAT16);
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}

Expand All @@ -789,10 +789,10 @@ mod tests {
assert_eq!(file.active_cluster, 166);
assert_eq!(file.size, 92789);
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/part.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pub mod tests {
assert_eq!(start, 2048);
assert_eq!(end, 1_048_575);
}
Err(e) => panic!(e),
Err(e) => panic!("{:?}", e),
}
}
}

0 comments on commit ba1e9f3

Please sign in to comment.