diff options
| author | Teddy Wing | 2018-08-08 06:07:27 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-08-08 06:07:27 +0200 |
| commit | 243759530668001f3e94ec1822b299cf2c28803f (patch) | |
| tree | 814c3d400ebda2d88ed85ea668ff35782b682693 /src | |
| parent | 8235c7d9f2d4aa5d423d34b388bb2ad5c5516de0 (diff) | |
| download | dome-key-map-243759530668001f3e94ec1822b299cf2c28803f.tar.bz2 | |
Make `Trigger` a list of headphone buttons
Cleans up the `HashMap` definition in `DKMapGroup`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2,11 +2,12 @@ extern crate combine; use std::collections::HashMap; -pub enum Trigger { +pub enum HeadphoneButton { Play, Up, Down, } +type Trigger = Vec<HeadphoneButton>; type Action = String; pub enum MapKind { Map, @@ -19,8 +20,8 @@ pub struct Map { } pub struct DKMapGroup { - maps: HashMap<Vec<Trigger>, Map>, - modes: HashMap<Vec<Trigger>, HashMap<Vec<Trigger>, Map>>, + maps: HashMap<Trigger, Map>, + modes: HashMap<Trigger, HashMap<Trigger, Map>>, } #[cfg(test)] |
