Fix page link_idx computation
This commit is contained in:
parent
a9435e4f64
commit
3296f6d15a
1 changed files with 2 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ impl FirstStage {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn insert_page(&mut self, id: u32, length: u32, redirect: bool, title: String) {
|
fn insert_page(&mut self, id: u32, length: u32, redirect: bool, title: String) {
|
||||||
let link_idx = self.pages.len() as u32;
|
let link_idx = self.links.len() as u32;
|
||||||
self.pages.push(Page {
|
self.pages.push(Page {
|
||||||
link_idx,
|
link_idx,
|
||||||
id,
|
id,
|
||||||
|
|
@ -156,7 +156,7 @@ impl SecondStage {
|
||||||
|
|
||||||
fn insert_page(&mut self, page: &Page<()>) {
|
fn insert_page(&mut self, page: &Page<()>) {
|
||||||
let mut page = page.clone();
|
let mut page = page.clone();
|
||||||
page.link_idx = self.pages.len() as u32;
|
page.link_idx = self.links.len() as u32;
|
||||||
self.pages.push(page);
|
self.pages.push(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue