(txn: &T, change: Hash, ancestor: Hash)
| 148 | } |
| 149 | |
| 150 | fn change_depends_on<T: GraphTxnT>(txn: &T, change: Hash, ancestor: Hash) -> bool { |
| 151 | if change == ancestor { |
| 152 | return false; |
| 153 | } |
| 154 | let mut pending = vec![change]; |
| 155 | let mut visited = HashSet::new(); |
| 156 | while let Some(hash) = pending.pop() { |
| 157 | if !visited.insert(hash) { |
| 158 | continue; |
| 159 | } |
| 160 | let Ok(Some(id)) = txn.get_internal(&hash) else { |
| 161 | continue; |
| 162 | }; |
| 163 | let Ok(deps) = txn.get_change_deps(id) else { |
| 164 | continue; |
| 165 | }; |
| 166 | if deps.contains(&ancestor) { |
| 167 | return true; |
| 168 | } |
| 169 | pending.extend(deps); |
| 170 | } |
| 171 | false |
| 172 | } |
| 173 | |
| 174 | fn external_inode_position<T: GraphTxnT + TreeTxnT>( |
| 175 | txn: &T, |
no test coverage detected