chore: clippy fix rust style

This commit is contained in:
quake
2022-07-20 21:38:50 +09:00
parent 8d91e7eb63
commit a0c07631e2
6 changed files with 9 additions and 13 deletions

View File

@@ -793,11 +793,8 @@ impl AST {
|| !options.contains(ASTFlags::CONSTANT) && include_variables =>
{
let (name, expr, ..) = &**x;
if let Some(value) = expr.get_literal_value() {
Some((name.as_str(), options.contains(ASTFlags::CONSTANT), value))
} else {
None
}
expr.get_literal_value()
.map(|value| (name.as_str(), options.contains(ASTFlags::CONSTANT), value))
}
_ => None,
})

View File

@@ -486,8 +486,7 @@ impl<'a> IntoIterator for &'a StmtBlock {
#[inline(always)]
fn into_iter(self) -> Self::IntoIter {
let x = self.block.iter();
x
self.block.iter()
}
}