summary refs log tree commit diff
path: root/src/librustc_ast_lowering/expr.rs
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_ast_lowering/expr.rs
parent3f9bddc7fea3ca1d49f39f22bb937a84ed32f84e (diff)
downloadrust-c9a02c2e427fa22c8a86f7818dcde17e53151c30.tar.gz
rust-c9a02c2e427fa22c8a86f7818dcde17e53151c30.zip
use .copied() instead of .map(|x| *x) on iterators
Diffstat (limited to 'src/librustc_ast_lowering/expr.rs')
-rw-r--r--src/librustc_ast_lowering/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_ast_lowering/expr.rs b/src/librustc_ast_lowering/expr.rs
index d781fbde59c..23ec924573c 100644
--- a/src/librustc_ast_lowering/expr.rs
+++ b/src/librustc_ast_lowering/expr.rs
@@ -1179,7 +1179,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
             let from_err_expr =
                 self.wrap_in_try_constructor(sym::from_error, unstable_span, from_expr, try_span);
             let thin_attrs = ThinVec::from(attrs);
-            let catch_scope = self.catch_scopes.last().map(|x| *x);
+            let catch_scope = self.catch_scopes.last().copied();
             let ret_expr = if let Some(catch_node) = catch_scope {
                 let target_id = Ok(self.lower_node_id(catch_node));
                 self.arena.alloc(self.expr(