require empty params for root handler

This commit is contained in:
Aiden McClelland
2024-05-02 17:30:57 -06:00
parent 94cf1ff5bf
commit 94da122d6c

View File

@@ -164,7 +164,7 @@ impl<Params, InheritedParams> ParentHandler<Params, InheritedParams> {
#[allow(private_bounds)]
pub fn root_handler<H>(mut self, handler: H) -> Self
where
H: IntoHandlers<Flat<Params, InheritedParams>>,
H: IntoHandlers<Flat<Params, InheritedParams>> + HandlerTypes<Params = Empty>,
{
self.subcommands.insert(None, handler.into_handlers());
self