@@ -531,7 +531,7 @@ impl<K: DepKind> DepGraph<K> {
531
531
// value to an existing node.
532
532
//
533
533
// For sanity, we still check that the loaded stable hash and the new one match.
534
- if let Some ( dep_node_index) = self . dep_node_index_of_opt ( & node) {
534
+ if let Some ( dep_node_index) = data . dep_node_index_of_opt ( & node) {
535
535
let _current_fingerprint =
536
536
crate :: query:: incremental_verify_ich ( cx, data, result, & node, hash_result) ;
537
537
@@ -589,16 +589,6 @@ impl<K: DepKind> DepGraph<K> {
589
589
self . next_virtual_depnode_index ( )
590
590
}
591
591
}
592
-
593
- #[ inline]
594
- pub fn dep_node_index_of ( & self , dep_node : & DepNode < K > ) -> DepNodeIndex {
595
- self . dep_node_index_of_opt ( dep_node) . unwrap ( )
596
- }
597
-
598
- #[ inline]
599
- pub fn dep_node_index_of_opt ( & self , dep_node : & DepNode < K > ) -> Option < DepNodeIndex > {
600
- self . data . as_ref ( ) . unwrap ( ) . dep_node_index_of_opt ( dep_node)
601
- }
602
592
}
603
593
604
594
impl < K : DepKind > DepGraphData < K > {
@@ -649,7 +639,7 @@ impl<K: DepKind> DepGraphData<K> {
649
639
impl < K : DepKind > DepGraph < K > {
650
640
#[ inline]
651
641
pub fn dep_node_exists ( & self , dep_node : & DepNode < K > ) -> bool {
652
- self . data . is_some ( ) && self . dep_node_index_of_opt ( dep_node) . is_some ( )
642
+ self . data . as_ref ( ) . and_then ( |data| data . dep_node_index_of_opt ( dep_node) ) . is_some ( )
653
643
}
654
644
655
645
/// Checks whether a previous work product exists for `v` and, if
0 commit comments