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 {
|
||||
environment: env.clone(),
|
||||
globals: env,
|
||||
locals: &locals,
|
||||
locals,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,11 +76,10 @@ impl<'a> ResolverState<'a> {
|
|||
self.scopes[self.scopes.len() - 1]
|
||||
.values()
|
||||
.filter(|v| v.state != SymState::Used)
|
||||
.filter(|v| !v.decl.lexeme.starts_with("_"))
|
||||
.nth(0)
|
||||
.find(|v| !v.decl.lexeme.starts_with('_'))
|
||||
.map_or(Ok(()), |v| {
|
||||
self.error(
|
||||
&v.decl,
|
||||
v.decl,
|
||||
"unused symbol; prefix its name with '_' to avoid this error",
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue