@@ -531,7 +531,7 @@ impl<K: DepKind> DepGraph<K> {
531531 // value to an existing node.
532532 //
533533 // 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) {
535535 let _current_fingerprint =
536536 crate :: query:: incremental_verify_ich ( cx, data, result, & node, hash_result) ;
537537
@@ -589,16 +589,6 @@ impl<K: DepKind> DepGraph<K> {
589589 self . next_virtual_depnode_index ( )
590590 }
591591 }
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- }
602592}
603593
604594impl < K : DepKind > DepGraphData < K > {
@@ -649,7 +639,7 @@ impl<K: DepKind> DepGraphData<K> {
649639impl < K : DepKind > DepGraph < K > {
650640 #[ inline]
651641 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 ( )
653643 }
654644
655645 /// Checks whether a previous work product exists for `v` and, if
0 commit comments