Skip to content

Commit cc69b42

Browse files
committed
Use contains with task_deps.reads.
1 parent 8392220 commit cc69b42

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_query_system/src/dep_graph

1 file changed

+1
-1
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ impl<D: Deps> DepGraph<D> {
484484
// As long as we only have a low number of reads we can avoid doing a hash
485485
// insert and potentially allocating/reallocating the hashmap
486486
let new_read = if task_deps.reads.len() < EdgesVec::INLINE_CAPACITY {
487-
task_deps.reads.iter().all(|other| *other != dep_node_index)
487+
!task_deps.reads.contains(&dep_node_index)
488488
} else {
489489
task_deps.read_set.insert(dep_node_index)
490490
};

0 commit comments

Comments
 (0)