File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,15 +71,7 @@ fn parse_modifier(input: &str) -> IResult<&str, Modifiers> {
7171
7272fn parse_char_key ( input : & str ) -> IResult < & str , ( Modifiers , KeyCode ) > {
7373 none_of ( "<>" ) ( input) ?;
74- map ( anychar, |c| {
75- let modifiers = if c. is_uppercase ( ) {
76- Modifiers :: SHIFT
77- } else {
78- Modifiers :: NONE
79- } ;
80-
81- ( modifiers, KeyCode :: Char ( c) )
82- } ) ( input)
74+ map ( anychar, |c| ( Modifiers :: NONE , KeyCode :: Char ( c) ) ) ( input)
8375}
8476
8577#[ cfg( test) ]
@@ -100,7 +92,7 @@ mod tests {
10092 fn upper_char ( ) {
10193 assert_eq ! (
10294 parse_keys( "A" ) ,
103- Ok ( ( "" , vec![ ( Modifiers :: SHIFT , Char ( 'A' ) ) ] ) )
95+ Ok ( ( "" , vec![ ( Modifiers :: NONE , Char ( 'A' ) ) ] ) )
10496 ) ;
10597 }
10698
@@ -145,7 +137,7 @@ mod tests {
145137 vec![
146138 ( Modifiers :: NONE , Char ( '1' ) ) ,
147139 ( Modifiers :: ALT , End ) ,
148- ( Modifiers :: SHIFT , Char ( 'A' ) ) ,
140+ ( Modifiers :: NONE , Char ( 'A' ) ) ,
149141 ]
150142 ) )
151143 ) ;
You can’t perform that action at this time.
0 commit comments