Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 17, 2022
1 parent 444841b commit 8527bfc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ui_test/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ pub(crate) struct ErrorMatch {

impl Condition {
fn parse(c: &str) -> Self {
match c {
"on-host" => return Condition::OnHost,
_ => {}
}
if let Some(bits) = c.strip_suffix("bit") {
if c == "on-host" {
Condition::OnHost
} else if let Some(bits) = c.strip_suffix("bit") {
let bits: u8 = bits.parse().expect(
"ignore/only filter ending in 'bit' must be of the form 'Nbit' for some integer N",
);
Expand Down

0 comments on commit 8527bfc

Please sign in to comment.