Fix clippy::cloned_instead_of_copied (pedantic)

“used `cloned` where `copied` could be used instead”

https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2022-11-21 16:43:31 -08:00 committed by Charlie Marsh
parent 7c7489c1dd
commit 0a506eff34

View file

@ -2194,7 +2194,7 @@ impl<'a> Checker<'a> {
pub fn binding_context(&self) -> BindingContext {
let mut rev = self.parent_stack.iter().rev().fuse();
let defined_by = *rev.next().expect("Expected to bind within a statement.");
let defined_in = rev.next().cloned();
let defined_in = rev.next().copied();
BindingContext {
defined_by,
defined_in,