Changed Ctrl-r to ctrl-r for displaying key mappings

This commit is contained in:
2023-08-08 10:50:07 -06:00
parent 5602fc4341
commit 68aaa21030
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ impl Display for Key {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match *self {
Key::Char(c) => write!(f, "<{}>", c),
Key::Ctrl(c) => write!(f, "<Ctrl-{}>", c),
Key::Ctrl(c) => write!(f, "<ctrl-{}>", c),
Key::Up => write!(f, "<↑>"),
Key::Down => write!(f, "<↓>"),
Key::Left => write!(f, "<←>"),
+1 -1
View File
@@ -19,7 +19,7 @@ mod tests {
#[case(Key::Tab, "tab")]
#[case(Key::Delete, "del")]
#[case(Key::Char('q'), "q")]
#[case(Key::Ctrl('q'), "Ctrl-q")]
#[case(Key::Ctrl('q'), "ctrl-q")]
fn test_key_formatter(#[case] key: Key, #[case] expected_str: &str) {
assert_str_eq!(format!("{}", key), format!("<{}>", expected_str));
}