Clippy notes in operators.rs
This commit is contained in:
parent
2fe4109296
commit
5bba900a3d
@ -17,12 +17,7 @@ impl PrefixOp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_prefix(op: &str) -> bool {
|
pub fn is_prefix(op: &str) -> bool {
|
||||||
match op {
|
matches!(op, "+" | "-" | "!")
|
||||||
"+" => true,
|
|
||||||
"-" => true,
|
|
||||||
"!" => true,
|
|
||||||
_ => false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +49,7 @@ impl BinOp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn token_kind_to_sigil<'a>(tok: &'a TokenKind) -> Option<&'a str> {
|
fn token_kind_to_sigil(tok: & TokenKind) -> Option<&str> {
|
||||||
use self::TokenKind::*;
|
use self::TokenKind::*;
|
||||||
Some(match tok {
|
Some(match tok {
|
||||||
Operator(op) => op.as_str(),
|
Operator(op) => op.as_str(),
|
||||||
|
Loading…
Reference in New Issue
Block a user