dsl: auto-impl the obvious one (hopefully)
Some checks are pending
/ build (push) Waiting to run

re foreign trait constraints
This commit is contained in:
🪞👃🪞 2025-05-23 21:47:18 +03:00
parent ddf0c05d5f
commit cbd28a5934
10 changed files with 30 additions and 24 deletions

View file

@ -84,7 +84,7 @@ impl ToTokens for CommandDef {
let mut out = TokenStream2::new();
for (arg, ty) in arm.args() {
write_quote_to(&mut out, quote! {
#arg: Take::provide_or_fail(self, words)?,
#arg: Take::take_or_fail(self, words)?,
});
}
out
@ -150,7 +150,7 @@ impl ToTokens for CommandDef {
}
/// Generated by [tengri_proc::command].
impl<'n> ::tengri::dsl::Take<'n, #state> for #command_enum {
fn provide <'source> (
fn take <'source> (
state: &#state,
words: &mut ::tengri::dsl::TokenIter<'source>
) -> Perhaps<Self> {