Skip to content

Instantly share code, notes, and snippets.

@daboross
Last active May 29, 2017 18:58
Show Gist options
  • Save daboross/f12f66ad1696c002e9a4a9b3cabe175f to your computer and use it in GitHub Desktop.
Save daboross/f12f66ad1696c002e9a4a9b3cabe175f to your computer and use it in GitHub Desktop.
match c.unwrap() {
Key::Esc => break,
Key::Char(c) => input.push(c),
Key::Backspace if !input.is_empty() => {
input.remove(input.len());
}
_ => {},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment