about summary refs log tree commit diff
path: root/src/librustc_span
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-02-29 13:14:52 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-02-29 15:23:13 +0100
commitc9a02c2e427fa22c8a86f7818dcde17e53151c30 (patch)
treefe98199cffe0ef210984db1d626b6280ce262553 /src/librustc_span
parent3f9bddc7fea3ca1d49f39f22bb937a84ed32f84e (diff)
use .copied() instead of .map(|x| *x) on iterators
Diffstat (limited to 'src/librustc_span')
-rw-r--r--src/librustc_span/source_map.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_span/source_map.rs b/src/librustc_span/source_map.rs
index 31d397f040c..3b665e1d6dc 100644
--- a/src/librustc_span/source_map.rs
+++ b/src/librustc_span/source_map.rs
@@ -206,7 +206,7 @@ impl SourceMap {
         &self,
         stable_id: StableSourceFileId,
     ) -> Option<Lrc<SourceFile>> {
-        self.files.borrow().stable_id_to_source_file.get(&stable_id).map(|sf| sf.clone())
+        self.files.borrow().stable_id_to_source_file.get(&stable_id).cloned()
     }
 
     fn allocate_address_space(&self, size: usize) -> Result<usize, OffsetOverflowError> {