Skip to content

Commit

Permalink
feat(val|action): make the enum configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Shi-Raida authored and arbimo committed Nov 20, 2023
1 parent 9897d4f commit d4bbd63
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions validator/src/models/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ impl<E: Clone + Interpreter + SuffixParams> Action<E> {
}
}

impl<E: Clone + SuffixParams> Configurable<E> for Action<E> {
fn id(&self) -> &str {
match self {
Action::Span(s) => s.id(),
Action::Durative(d) => d.id(),
}
}

fn params(&self) -> &[Parameter] {
match self {
Action::Span(s) => s.params(),
Action::Durative(d) => d.params(),
}
}
}

impl<E: SuffixParams> SuffixParams for Action<E> {
fn suffix_params_with(&mut self, suffix: &str) -> Result<()> {
match self {
Expand Down

0 comments on commit d4bbd63

Please sign in to comment.