fix with_initial_path

This commit is contained in:
Evan Almloff committed 2023-07-14 08:22:31 -07:00
1 parent 8a142bbc95
commit 1dac04ba8a
3 files changed
+46 -20

No files matched your search

+3 -2
View File
@@ -39,7 +39,8 @@ where
pub fn with_initial_path(path: R) -> Self {
Self {
current: path,
..Default::default()
history: Vec::new(),
future: Vec::new(),
}
}
}
@@ -52,7 +53,7 @@ where
Self {
current: "/".parse().unwrap_or_else(|err| {
panic!("index route does not exist:\n{}\n use MemoryHistory::with_initial_path to set a custom path", err)
}),
}),
history: Vec::new(),
future: Vec::new(),
}