Prefer unreachable over panic where appropriate
This commit is contained in:
parent
73a049ab8d
commit
3963f8da0a
2 changed files with 3 additions and 3 deletions
|
|
@ -513,7 +513,7 @@ fn parse_numeric_range_opts(input: &str,
|
|||
}
|
||||
return Ok(items);
|
||||
}
|
||||
_ => panic!("Unreachable"),
|
||||
_ => unreachable!(),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ impl PngData {
|
|||
last_line = data.clone();
|
||||
unfiltered.append(&mut data);
|
||||
}
|
||||
_ => panic!("Unreachable"),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
unfiltered
|
||||
|
|
@ -589,7 +589,7 @@ impl PngData {
|
|||
filtered.push(best.0);
|
||||
filtered.extend_from_slice(best.1);
|
||||
}
|
||||
_ => panic!("Unreachable"),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
last_line = line.data.clone();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue