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

+6 -2
View File
@@ -60,13 +60,17 @@ impl<R> GenericRouterContext<R>
where
R: Routable,
{
pub(crate) fn new(cfg: RouterConfig<R>, mark_dirty: Arc<dyn Fn(ScopeId) + Sync + Send>) -> Self
pub(crate) fn new(
mut cfg: RouterConfig<R>,
mark_dirty: Arc<dyn Fn(ScopeId) + Sync + Send>,
) -> Self
where
R: Clone,
<R as std::str::FromStr>::Err: std::fmt::Display,
{
let state = Arc::new(RwLock::new(MutableRouterState {
prefix: Default::default(),
history: cfg.history,
history: cfg.take_history(),
unresolved_error: None,
}));