diff options
| author | Kevin Butler <haqkrs@gmail.com> | 2015-02-13 07:33:44 +0000 |
|---|---|---|
| committer | Kevin Butler <haqkrs@gmail.com> | 2015-02-18 00:56:07 +0000 |
| commit | 2f586b9687e5c33d9d3b8eccfc309f65d2a9f4e9 (patch) | |
| tree | 578e2d49b5c8b71d7c38142adcf6d10dba09d690 /src/libsyntax/ast_map | |
| parent | 5705d48e280f8a0065c214edfb3dcdcecc323316 (diff) | |
| download | rust-2f586b9687e5c33d9d3b8eccfc309f65d2a9f4e9.tar.gz rust-2f586b9687e5c33d9d3b8eccfc309f65d2a9f4e9.zip | |
Opt for .cloned() over .map(|x| x.clone()) etc.
Diffstat (limited to 'src/libsyntax/ast_map')
| -rw-r--r-- | src/libsyntax/ast_map/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs index 5535e5911e0..6535705388d 100644 --- a/src/libsyntax/ast_map/mod.rs +++ b/src/libsyntax/ast_map/mod.rs @@ -251,7 +251,7 @@ impl<'ast> Map<'ast> { } fn find_entry(&self, id: NodeId) -> Option<MapEntry<'ast>> { - self.map.borrow().get(id as usize).map(|e| *e) + self.map.borrow().get(id as usize).cloned() } pub fn krate(&self) -> &'ast Crate { |
