Add PageIdx::MAX

This commit is contained in:
Joscha 2024-08-25 22:04:55 +02:00
parent 7a2372fedd
commit 17b118693f
3 changed files with 12 additions and 4 deletions

View file

@ -18,7 +18,7 @@ impl DijkstraPageInfo {
fn from_page_info(info: PageInfo) -> Self {
Self {
cost: u32::MAX,
prev: PageIdx(u32::MAX),
prev: PageIdx::MAX,
redirect: info.redirect,
}
}
@ -122,7 +122,7 @@ fn dijkstra(
loop {
steps.push(at);
at = data.page(at).data.prev;
if at == PageIdx(u32::MAX) {
if at == PageIdx::MAX {
break;
};
}