diff options
| author | Teddy Wing | 2018-10-03 01:14:29 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2018-10-03 01:14:29 +0200 | 
| commit | 54cc9a4b02acf1339c63dabece9eaf07f28fb152 (patch) | |
| tree | 4f1b910b27bc4a8b1c860453493ec98286ddd35d /src | |
| parent | 48fcb96befe65ca30bfd91f4194afb9e99258f4a (diff) | |
| download | dome-key-map-54cc9a4b02acf1339c63dabece9eaf07f28fb152.tar.bz2 | |
Clean up old code from 48fcb96befe65ca30bfd91f4194afb9e99258f4a
Get rid of old commented code now that we have a working version.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cocoa_bridge.rs | 10 | ||||
| -rw-r--r-- | src/parser.rs | 46 | 
2 files changed, 0 insertions, 56 deletions
| diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs index dd8688b..68a8515 100644 --- a/src/cocoa_bridge.rs +++ b/src/cocoa_bridge.rs @@ -136,16 +136,6 @@ pub extern "C" fn state_load_map_group(ptr: *mut State) {                      let dkmap = fs::read_to_string(mapping_file)                          .expect("Failed to read 'mappings.dkmap'"); -                    // state.map_group = Some( -                    //     MapGroup::parse(&dkmap) -                    //         .expect("Failed to parse 'mappings.dkmap'") -                    // ); -                    // -                    // state.map_group.map(|mut map_group| { -                    //     map_group.parse_actions(); -                    // -                    //     map_group -                    // });                      let mut map_group = MapGroup::parse(&dkmap)                          .expect("Failed to parse 'mappings.dkmap'"); diff --git a/src/parser.rs b/src/parser.rs index 08c52c8..5d79cc9 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,5 +1,4 @@  use std::collections::HashMap; -use std::mem;  use autopilot;  use autopilot::key::{Flag, KeyCodeConvertible}; @@ -101,18 +100,6 @@ impl Action {              Action::Command(_) => false,          }      } - -    // pub fn map_string<'a, F>(&mut self, mut f: F) -> &Self -    // where -    //     F: FnMut(&mut Self, &mut str) -    // { -    //     match self { -    //         Action::String(s) => f(self, s), -    //         _ => (), -    //     }; -    // -    //     self -    // }  }  #[repr(C)] @@ -161,45 +148,12 @@ impl MapGroup {      ) -> Result<MapGroup, CombineErrors<char, &str, SourcePosition>> {          let input = State::new(mappings);          map_group().easy_parse(input).map(|t| t.0) - -        // map_group.map(Self::parse_actions)      } -    // pub fn parse_actions(map_group: MapGroup) -> MapGroup {      pub fn parse_actions(&mut self) {          for map_action in self.maps.values_mut() {              match map_action.kind {                  MapKind::Map => { -                    // if map_action.action.is_string() { -                    //     let input = State::new(map_action.action); -                    // -                    //     map_action.action = action_map() -                    //         .easy_parse(input) -                    //         .map(|t| t.0) -                    //         .unwrap(); -                    // } - -                    // map_action.action.map_string(|mut _action, string| { -                    //     let input = State::new(string.to_owned().as_str()); -                    // -                    //     _action = &mut action_map() -                    //         .easy_parse(input) -                    //         .map(|t| t.0) -                    //         .unwrap(); -                    // }); - -                    // map_action.action = match map_action.action { -                    //     Action::String(ref mut s) => { -                    //         let input = State::new(s.as_str()); -                    // -                    //         action_map() -                    //             .easy_parse(input) -                    //             .map(|t| t.0) -                    //             .unwrap() -                    //     }, -                    //     _ => map_action.action, -                    // }; -                      let action = match map_action.action {                          Action::String(ref s) => {                              let input = State::new(s.as_str()); | 
