Skip to content

Commit 4f65538

Browse files
committed
1 parent 8844190 commit 4f65538

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/test/run-pass/issue-29740.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ fn key_from_string(key_string: &str, location: u32) -> Option<Key> {
242242
"}" => Some(Key::RightBracket),
243243
"]" => Some(Key::RightBracket),
244244
"Escape" => Some(Key::Escape),
245-
"Enter" if location == KeyboardEventConstants::DOM_KEY_LOCATION_STANDARD => Some(Key::Enter),
245+
"Enter" if location == KeyboardEventConstants::DOM_KEY_LOCATION_STANDARD
246+
=> Some(Key::Enter),
246247
"Tab" => Some(Key::Tab),
247248
"Backspace" => Some(Key::Backspace),
248249
"Insert" => Some(Key::Insert),
@@ -300,16 +301,23 @@ fn key_from_string(key_string: &str, location: u32) -> Option<Key> {
300301
"*" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpMultiply),
301302
"-" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpSubtract),
302303
"+" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpAdd),
303-
"Enter" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpEnter),
304+
"Enter" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD
305+
=> Some(Key::KpEnter),
304306
"=" if location == KeyboardEventConstants::DOM_KEY_LOCATION_NUMPAD => Some(Key::KpEqual),
305-
"Shift" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT => Some(Key::LeftShift),
306-
"Control" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT => Some(Key::LeftControl),
307+
"Shift" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT
308+
=> Some(Key::LeftShift),
309+
"Control" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT
310+
=> Some(Key::LeftControl),
307311
"Alt" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT => Some(Key::LeftAlt),
308-
"Super" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT => Some(Key::LeftSuper),
309-
"Shift" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT => Some(Key::RightShift),
310-
"Control" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT => Some(Key::RightControl),
312+
"Super" if location == KeyboardEventConstants::DOM_KEY_LOCATION_LEFT
313+
=> Some(Key::LeftSuper),
314+
"Shift" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT
315+
=> Some(Key::RightShift),
316+
"Control" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT
317+
=> Some(Key::RightControl),
311318
"Alt" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT => Some(Key::RightAlt),
312-
"Super" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT => Some(Key::RightSuper),
319+
"Super" if location == KeyboardEventConstants::DOM_KEY_LOCATION_RIGHT
320+
=> Some(Key::RightSuper),
313321
"ContextMenu" => Some(Key::Menu),
314322
_ => None
315323
}

0 commit comments

Comments
 (0)