mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:10:09 +00:00
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:
parent
7c7489c1dd
commit
0a506eff34
1 changed files with 1 additions and 1 deletions
|
@ -2194,7 +2194,7 @@ impl<'a> Checker<'a> {
|
||||||
pub fn binding_context(&self) -> BindingContext {
|
pub fn binding_context(&self) -> BindingContext {
|
||||||
let mut rev = self.parent_stack.iter().rev().fuse();
|
let mut rev = self.parent_stack.iter().rev().fuse();
|
||||||
let defined_by = *rev.next().expect("Expected to bind within a statement.");
|
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 {
|
BindingContext {
|
||||||
defined_by,
|
defined_by,
|
||||||
defined_in,
|
defined_in,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue