about summary refs log tree commit diff
path: root/compiler/rustc_query_system
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-10-26 21:02:48 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-10-30 10:13:39 -0400
commit57c6ed0c07aaea9c89a192e54b3274464ebe6fbf (patch)
tree98a2c0310690cf0c09851cb5a12a99264bbbf522 /compiler/rustc_query_system
parentbfecb18771aa0249efe05dd7c35fa232f180bb70 (diff)
downloadrust-57c6ed0c07aaea9c89a192e54b3274464ebe6fbf.tar.gz
rust-57c6ed0c07aaea9c89a192e54b3274464ebe6fbf.zip
Fix even more clippy warnings
Diffstat (limited to 'compiler/rustc_query_system')
-rw-r--r--compiler/rustc_query_system/src/dep_graph/graph.rs6
-rw-r--r--compiler/rustc_query_system/src/query/plumbing.rs6
2 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs
index 85335f0ba50..d9b687c48af 100644
--- a/compiler/rustc_query_system/src/dep_graph/graph.rs
+++ b/compiler/rustc_query_system/src/dep_graph/graph.rs
@@ -292,10 +292,8 @@ impl<K: DepKind> DepGraph<K> {
                 );
 
                 data.colors.insert(prev_index, color);
-            } else {
-                if print_status {
-                    eprintln!("[task::new] {:?}", key);
-                }
+            } else if print_status {
+                eprintln!("[task::new] {:?}", key);
             }
 
             (result, dep_node_index)
diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs
index 50f443716f4..426f5bb41d6 100644
--- a/compiler/rustc_query_system/src/query/plumbing.rs
+++ b/compiler/rustc_query_system/src/query/plumbing.rs
@@ -612,10 +612,8 @@ where
 
     prof_timer.finish_with_query_invocation_id(dep_node_index.into());
 
-    if unlikely!(!diagnostics.is_empty()) {
-        if dep_node.kind != DepKind::NULL {
-            tcx.store_diagnostics(dep_node_index, diagnostics);
-        }
+    if unlikely!(!diagnostics.is_empty()) && dep_node.kind != DepKind::NULL {
+        tcx.store_diagnostics(dep_node_index, diagnostics);
     }
 
     let result = job.complete(result, dep_node_index);