proc: allow implementing #[command] over more complex types

This commit is contained in:
🪞👃🪞 2025-05-18 18:31:40 +03:00
parent 921378b6db
commit 7ddbace030
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ use crate::*;
pub(crate) struct CommandDef(pub(crate) CommandMeta, pub(crate) CommandImpl);
#[derive(Debug, Clone)]
pub(crate) struct CommandMeta(Ident);
pub(crate) struct CommandMeta(TypePath);
#[derive(Debug, Clone)]
pub(crate) struct CommandImpl(ItemImpl, BTreeMap<Arc<str>, CommandArm>);
@ -14,7 +14,7 @@ struct CommandArm(Ident, Vec<FnArg>, #[allow(unused)] ReturnType);
impl Parse for CommandMeta {
fn parse (input: ParseStream) -> Result<Self> {
Ok(Self(input.parse::<Ident>()?))
Ok(Self(input.parse()?))
}
}