MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / next_inode_adj

Method next_inode_adj

atomic-core/src/pristine/view_graph.rs:92–119  ·  view source on GitHub ↗
(
        &self,
        adj: &mut InodeAdjState,
    )

Source from the content-addressed store, hash-verified

90 }
91
92 fn next_inode_adj(
93 &self,
94 adj: &mut InodeAdjState,
95 ) -> Option<Result<SerializedGraphEdge, Self::InodeError>> {
96 if adj.is_exhausted() {
97 return None;
98 }
99
100 // Filter inode edges by the view's visible change set,
101 // same as iter_adjacent does for the global GRAPH.
102 loop {
103 match self.inner.next_inode_adj(adj) {
104 Some(Ok(edge)) => {
105 let introduced = edge.introduced_by();
106 if introduced.is_root() || self.visibility.contains(introduced) {
107 return Some(Ok(edge));
108 }
109 // Edge from a non-visible change — skip it
110 continue;
111 }
112 Some(Err(error)) => {
113 adj.mark_exhausted();
114 return Some(Err(error));
115 }
116 None => return None,
117 }
118 }
119 }
120
121 fn find_block_in_inode(
122 &self,

Callers

nothing calls this directly

Calls 8

visible_edgeFunction · 0.85
is_exhaustedMethod · 0.80
mark_exhaustedMethod · 0.80
getMethod · 0.65
introduced_byMethod · 0.45
is_rootMethod · 0.45
containsMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected