Add show command
This commit is contained in:
parent
aa4187fcd8
commit
ceb987bbbc
5 changed files with 93 additions and 9 deletions
|
|
@ -193,4 +193,12 @@ impl Data {
|
|||
let mut file = BufReader::new(File::open(path)?);
|
||||
Self::read(&mut file)
|
||||
}
|
||||
|
||||
pub fn redirect_target(&self, node: NodeIdx) -> Option<NodeIdx> {
|
||||
if !self.pages[node.usize()].redirect {
|
||||
return None;
|
||||
}
|
||||
|
||||
self.graph.edge_slice(node).first().copied()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue