Print redirects differently

This commit is contained in:
Joscha 2022-10-22 18:41:47 +02:00
parent 0d4087fdde
commit d1a80a6ae6

View file

@ -151,8 +151,12 @@ pub fn path(datafile: &Path, from: &str, to: &str) -> io::Result<()> {
println!("Path found:"); println!("Path found:");
for page_idx in path { for page_idx in path {
let page = &pages[page_idx as usize]; let page = &pages[page_idx as usize];
if page.data.redirect {
println!(" v {}", page.data.title);
} else {
println!(" - {}", page.data.title); println!(" - {}", page.data.title);
} }
}
} else { } else {
println!("No path found"); println!("No path found");
} }