clippy
This commit is contained in:
parent
5fb3f52114
commit
dd4a48165a
@ -46,7 +46,7 @@ impl Op {
|
||||
/// Do not rely on the number itself, but rather the size relative to other numbers
|
||||
///
|
||||
/// If precedence is equal, the leftmost operation is evaluated first
|
||||
pub fn precedence(&self) -> usize {
|
||||
pub fn precedence(self) -> usize {
|
||||
match self {
|
||||
Self::And | Self::Or | Self::Not => 0,
|
||||
Self::Equal
|
||||
|
@ -330,7 +330,7 @@ impl Value {
|
||||
}
|
||||
}
|
||||
|
||||
Ok(if comma_separated.len() > 0 {
|
||||
Ok(if !comma_separated.is_empty() {
|
||||
if space_separated.len() == 1 {
|
||||
comma_separated.push(space_separated.pop().unwrap());
|
||||
} else if !space_separated.is_empty() {
|
||||
@ -410,7 +410,7 @@ impl Value {
|
||||
toks.next();
|
||||
let mut inner = read_until_closing_paren(toks);
|
||||
// todo: the above shouldn't eat the closing paren
|
||||
if inner.len() > 0 && inner.pop().unwrap().kind != ')' {
|
||||
if !inner.is_empty() && inner.pop().unwrap().kind != ')' {
|
||||
return Err("expected \")\".".into());
|
||||
}
|
||||
Ok(IntermediateValue::Paren(inner))
|
||||
|
Loading…
x
Reference in New Issue
Block a user