mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
update Justfile and fix some warnings
This commit is contained in:
parent
9e4406c66a
commit
b995f81a26
11 changed files with 67 additions and 84 deletions
|
|
@ -1,9 +1,8 @@
|
|||
use crate::*;
|
||||
|
||||
pub struct EventMap<'a, S, I: PartialEq, C> {
|
||||
pub bindings: &'a [(I, &'a dyn Fn(&S) -> Option<C>)],
|
||||
pub fallback: Option<&'a dyn Fn(&S, &I) -> Option<C>>
|
||||
}
|
||||
|
||||
impl<'a, S, I: PartialEq, C> EventMap<'a, S, I, C> {
|
||||
pub fn handle (&self, state: &S, input: &I) -> Option<C> {
|
||||
for (binding, handler) in self.bindings.iter() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue