Happy clippy is happy (and Clippy)
This commit is contained in:
parent
8741692fad
commit
6252bed605
2 changed files with 3 additions and 4 deletions
|
@ -33,7 +33,7 @@ impl<'a> InterpreterState<'a> {
|
||||||
Self {
|
Self {
|
||||||
environment: env.clone(),
|
environment: env.clone(),
|
||||||
globals: env,
|
globals: env,
|
||||||
locals: &locals,
|
locals,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,11 +76,10 @@ impl<'a> ResolverState<'a> {
|
||||||
self.scopes[self.scopes.len() - 1]
|
self.scopes[self.scopes.len() - 1]
|
||||||
.values()
|
.values()
|
||||||
.filter(|v| v.state != SymState::Used)
|
.filter(|v| v.state != SymState::Used)
|
||||||
.filter(|v| !v.decl.lexeme.starts_with("_"))
|
.find(|v| !v.decl.lexeme.starts_with('_'))
|
||||||
.nth(0)
|
|
||||||
.map_or(Ok(()), |v| {
|
.map_or(Ok(()), |v| {
|
||||||
self.error(
|
self.error(
|
||||||
&v.decl,
|
v.decl,
|
||||||
"unused symbol; prefix its name with '_' to avoid this error",
|
"unused symbol; prefix its name with '_' to avoid this error",
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue