aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/textinput.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r--components/script/textinput.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs
index 24383bf3fb4..f99f5e8781c 100644
--- a/components/script/textinput.rs
+++ b/components/script/textinput.rs
@@ -14,7 +14,6 @@ use util::str::DOMString;
use std::borrow::ToOwned;
use std::cmp::{min, max};
use std::default::Default;
-use std::num::SignedInt;
use std::sync::mpsc::channel;
#[derive(Copy, Clone, PartialEq)]
@@ -310,7 +309,7 @@ impl TextInput {
},
// printable characters have single-character key values
c if c.len() == 1 => {
- self.insert_char(c.char_at(0));
+ self.insert_char(c.chars().next().unwrap());
KeyReaction::DispatchInput
}
"Space" => {