Prefer unreachable over panic where appropriate

This commit is contained in:
Joshua Holmer 2016-03-02 14:16:34 -05:00
parent 73a049ab8d
commit 3963f8da0a
2 changed files with 3 additions and 3 deletions

View file

@ -513,7 +513,7 @@ fn parse_numeric_range_opts(input: &str,
}
return Ok(items);
}
_ => panic!("Unreachable"),
_ => unreachable!(),
});
}

View file

@ -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();
}