mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-04-03 13:30:44 +02:00
fix(play): def_command
This commit is contained in:
parent
cf57f44933
commit
30d378a6ee
1 changed files with 3 additions and 3 deletions
|
|
@ -71,11 +71,11 @@ impl Thread {
|
|||
// FIXME: support attrs (docstrings)
|
||||
$($Variant $({ $($arg: $Arg),* })?),*
|
||||
}
|
||||
impl ::tengri::Command<$State> for $Command {
|
||||
fn execute (&self, $state: &mut $State) -> Perhaps<Self> {
|
||||
impl ::tengri::dizzle::Act<$State> for $Command {
|
||||
fn act (&self, $state: &mut $State) -> Perhaps<Self> {
|
||||
match self {
|
||||
$(Self::$Variant $({ $($arg),* })? => $body,)*
|
||||
_ => unimplemented!("Command<{}>: {self:?}", stringify!($State)),
|
||||
_ => unimplemented!("Act<{}>: {self:?}", stringify!($State)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue