Janitor: Fix clippy::map_clone

This commit is contained in:
Tobias Hunger 2021-08-04 22:02:54 +02:00 committed by Olivier Goffart
parent 0d73917526
commit 04738a900f
3 changed files with 4 additions and 4 deletions

View file

@ -1367,7 +1367,7 @@ unsafe extern "C" fn parent_item(component: ComponentRefPin, index: usize, resul
.original
.parent_element
.upgrade()
.and_then(|e| e.borrow().item_index.get().map(|x| *x));
.and_then(|e| e.borrow().item_index.get().cloned());
if let (Some(parent_offset), Some(parent_index)) =
(instance_ref.component_type.parent_component_offset, parent_item_index)
{