Skip to content

Commit

Permalink
Use unreachable instead of panic.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Nov 11, 2023
1 parent 7dd15fe commit 1e1a42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/core/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ pub fn parse_human_size(input: &str) -> CargoResult<u64> {
"kib" => 1024.0,
"mib" => 1024.0 * 1024.0,
"gib" => 1024.0 * 1024.0 * 1024.0,
s => panic!("suffix `{s}` out of sync with regex"),
s => unreachable!("suffix `{s}` out of sync with regex"),
},
None => {
return cap[1]
Expand Down

0 comments on commit 1e1a42c

Please sign in to comment.