chore: satisfy clippy::multiple_bound_locations

This commit is contained in:
Erich Gubler 2024-05-02 16:07:57 -04:00
parent 0f751b147a
commit b4193d50db

View File

@ -268,10 +268,10 @@ where
/// the current scope to the root scope, returning `Some` when a variable is /// the current scope to the root scope, returning `Some` when a variable is
/// found or `None` if there doesn't exist a variable with `name` in any /// found or `None` if there doesn't exist a variable with `name` in any
/// scope. /// scope.
pub fn lookup<Q: ?Sized>(&self, name: &Q) -> Option<&Var> pub fn lookup<Q>(&self, name: &Q) -> Option<&Var>
where where
Name: std::borrow::Borrow<Q>, Name: std::borrow::Borrow<Q>,
Q: std::hash::Hash + Eq, Q: std::hash::Hash + Eq + ?Sized,
{ {
// Iterate backwards trough the scopes and try to find the variable // Iterate backwards trough the scopes and try to find the variable
for scope in self.scopes[..self.cursor].iter().rev() { for scope in self.scopes[..self.cursor].iter().rev() {