]> git.lizzy.rs Git - rust.git/commitdiff
mir/borrowck: remove a redundant clone
authorljedrz <ljedrz@gmail.com>
Tue, 16 Oct 2018 13:33:03 +0000 (15:33 +0200)
committerljedrz <ljedrz@gmail.com>
Wed, 17 Oct 2018 12:40:47 +0000 (14:40 +0200)
src/librustc_mir/borrow_check/error_reporting.rs

index 06918d9ebab37eb10547a31c4cb241fff8a773e3..759b842e9dfee24731e9fb0493a18d165db6ffba 100644 (file)
@@ -77,9 +77,7 @@ pub(super) fn report_use_of_moved_or_uninitialized(
         if move_out_indices.is_empty() {
             let root_place = self.prefixes(&used_place, PrefixSet::All).last().unwrap();
 
-            if self.uninitialized_error_reported
-                .contains(&root_place.clone())
-            {
+            if self.uninitialized_error_reported.contains(root_place) {
                 debug!(
                     "report_use_of_moved_or_uninitialized place: error about {:?} suppressed",
                     root_place