this trait will NOT have a lifetime

This commit is contained in:
🪞👃🪞 2025-01-18 00:30:13 +01:00
parent 38f69ddd50
commit 5e7b867aba
3 changed files with 67 additions and 64 deletions

View file

@ -71,7 +71,7 @@ impl<'a> KeyMap for ArcKeyMap {
/// [Input] state that can be matched against an [Atom].
pub trait EdnInput: Input {
fn matches_edn (&self, token: &str) -> bool;
fn get_event <'a> (_: &impl Atom<'a>) -> Option<Self::Event> {
fn get_event <'a> (_: &impl Atom) -> Option<Self::Event> {
None
}
}
@ -79,8 +79,8 @@ pub trait EdnInput: Input {
pub trait EdnCommand<C>: Command<C> {
fn from_edn <'a> (
state: &C,
head: &impl Atom<'a>,
tail: &'a [impl Atom<'a>]
head: &impl Atom,
tail: &'a [impl Atom]
) -> Option<Self>;
}
/** Implement `EdnCommand` for given `State` and `Command` */