Skip to content

Commit 41a7432

Browse files
committed
Prepare pages into a Box
1 parent 2d4e9bc commit 41a7432

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/page.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ impl<'p> Page<'p> {
296296
/// Appropriately sort the given vector of pages and create all the directories where
297297
/// they will be rendered to.
298298
#[inline]
299-
pub fn prepare(mut pages: Vec<Self>, config: &Config) -> Result<Vec<Self>, io::Error> {
299+
pub fn prepare(mut pages: Vec<Self>, config: &Config) -> Result<Box<[Self]>, io::Error> {
300300
let output_dir = Path::new(config.output_dir.as_ref());
301301
for i in 0..pages.len() {
302302
let page = &pages[i];
@@ -343,7 +343,7 @@ impl<'p> Page<'p> {
343343
pages[i].id = i;
344344
}
345345

346-
Ok(pages)
346+
Ok(pages.into())
347347
}
348348

349349
/// Get a reference of the page, in context of its subpages and subsections.

0 commit comments

Comments
 (0)