about summary refs log tree commit diff
path: root/src/librustc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-03-22 12:43:19 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-03-22 12:43:19 +0100
commit263cbd1bbe2d89880c04b69a003f98ca12ba4970 (patch)
treedf9f187c92391eff28bfddf8b70bfe0e76b854cd /src/librustc
parent5574b1df577f737373b42cbf364b6cab2dfa5960 (diff)
remove redundant closures (clippy::redundant_closure)
Diffstat (limited to 'src/librustc')
-rw-r--r--src/librustc/dep_graph/graph.rs2
-rw-r--r--src/librustc/mir/interpret/allocation.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs
index 40192d072eb..f3ae2b3d57a 100644
--- a/src/librustc/dep_graph/graph.rs
+++ b/src/librustc/dep_graph/graph.rs
@@ -245,7 +245,7 @@ impl DepGraph {
         C: DepGraphSafe + StableHashingContextProvider<'a>,
     {
         if let Some(ref data) = self.data {
-            let task_deps = create_task(key).map(|deps| Lock::new(deps));
+            let task_deps = create_task(key).map(Lock::new);
 
             // In incremental mode, hash the result of the task. We don't
             // do anything with the hash yet, but we are computing it
diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs
index 9474f05b55d..dd2a3f6c29a 100644
--- a/src/librustc/mir/interpret/allocation.rs
+++ b/src/librustc/mir/interpret/allocation.rs
@@ -796,7 +796,7 @@ impl UndefMask {
         }
 
         // FIXME(oli-obk): optimize this for allocations larger than a block.
-        let idx = (start.bytes()..end.bytes()).map(|i| Size::from_bytes(i)).find(|&i| !self.get(i));
+        let idx = (start.bytes()..end.bytes()).map(Size::from_bytes).find(|&i| !self.get(i));
 
         match idx {
             Some(idx) => Err(idx),