commit
f8a222a5e1
@ -31,7 +31,6 @@ pub(crate) struct Comments {
|
|||||||
pub error_matches: Vec<ErrorMatch>,
|
pub error_matches: Vec<ErrorMatch>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// The conditions used for "ignore" and "only" filters.
|
/// The conditions used for "ignore" and "only" filters.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) enum Condition {
|
pub(crate) enum Condition {
|
||||||
@ -55,7 +54,9 @@ pub(crate) struct ErrorMatch {
|
|||||||
impl Condition {
|
impl Condition {
|
||||||
fn parse(c: &str) -> Self {
|
fn parse(c: &str) -> Self {
|
||||||
if let Some(bits) = c.strip_suffix("bit") {
|
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");
|
let bits: u8 = bits.parse().expect(
|
||||||
|
"ignore/only filter ending in 'bit' must be of the form 'Nbit' for some integer N",
|
||||||
|
);
|
||||||
Condition::Bitwidth(bits)
|
Condition::Bitwidth(bits)
|
||||||
} else {
|
} else {
|
||||||
Condition::Target(c.to_owned())
|
Condition::Target(c.to_owned())
|
||||||
|
Loading…
Reference in New Issue
Block a user