diff --git a/src/router.rs b/src/router.rs index 70b1ab35..5407693d 100644 --- a/src/router.rs +++ b/src/router.rs @@ -45,7 +45,7 @@ impl Router { ) { self.method_map .entry(method) - .or_insert_with(MethodRouter::new) + .or_default() .add(path, ep) .unwrap() }