diff --git a/crates/egui_router/src/lib.rs b/crates/egui_router/src/lib.rs index 6b7455a..f47db26 100644 --- a/crates/egui_router/src/lib.rs +++ b/crates/egui_router/src/lib.rs @@ -131,10 +131,15 @@ impl EguiRouter { self } - pub fn route(&mut self, route: impl Into, handler: impl Handler + 'static) { + pub fn route( + mut self, + route: impl Into, + handler: impl Handler + 'static, + ) -> Self { self.router .insert(route.into(), Box::new(handler)) .expect("Invalid route"); + self } pub fn navigate_transition(