I <3 CLIPPY
This commit is contained in:
parent
9d555acae0
commit
0a38903154
2 changed files with 5 additions and 5 deletions
|
@ -206,7 +206,9 @@ impl AstDumper for ExprNode {
|
||||||
arguments,
|
arguments,
|
||||||
} => {
|
} => {
|
||||||
let callee = callee.dump();
|
let callee = callee.dump();
|
||||||
if arguments.len() > 0 {
|
if arguments.is_empty() {
|
||||||
|
format!("( call {} )", callee)
|
||||||
|
} else {
|
||||||
format!(
|
format!(
|
||||||
"( call {} {} )",
|
"( call {} {} )",
|
||||||
callee,
|
callee,
|
||||||
|
@ -216,8 +218,6 @@ impl AstDumper for ExprNode {
|
||||||
.collect::<Vec<String>>()
|
.collect::<Vec<String>>()
|
||||||
.join(" ")
|
.join(" ")
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
format!("( call {} )", callee)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,8 @@ impl Value {
|
||||||
/// Check whether a value is truthy or not.
|
/// Check whether a value is truthy or not.
|
||||||
pub fn is_truthy(&self) -> bool {
|
pub fn is_truthy(&self) -> bool {
|
||||||
match self {
|
match self {
|
||||||
&Self::Nil => false,
|
Self::Nil => false,
|
||||||
&Self::Boolean(b) => b,
|
Self::Boolean(b) => *b,
|
||||||
_ => true,
|
_ => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue