aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/keyboardevent.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-20 14:45:36 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-20 14:49:07 +0100
commit01ed338746ae71493984259335197e6b66daec45 (patch)
treeb568699de2c64d6f4eb21b197fd648c354d0ed37 /components/script/dom/keyboardevent.rs
parent2d5b0e085571594e7da2ee519605dd6fac2caa54 (diff)
downloadservo-01ed338746ae71493984259335197e6b66daec45.tar.gz
servo-01ed338746ae71493984259335197e6b66daec45.zip
Move to to_owned rather than into_string.
into_string has been removed from Rust.
Diffstat (limited to 'components/script/dom/keyboardevent.rs')
-rw-r--r--components/script/dom/keyboardevent.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/script/dom/keyboardevent.rs b/components/script/dom/keyboardevent.rs
index e28f1c90c6c..cf4cadca3a1 100644
--- a/components/script/dom/keyboardevent.rs
+++ b/components/script/dom/keyboardevent.rs
@@ -15,6 +15,8 @@ use dom::uievent::UIEvent;
use dom::window::Window;
use servo_msg::constellation_msg;
use servo_util::str::DOMString;
+
+use std::borrow::ToOwned;
use std::cell::{RefCell, Cell};
#[jstraceable]
@@ -44,8 +46,8 @@ impl KeyboardEvent {
fn new_inherited() -> KeyboardEvent {
KeyboardEvent {
uievent: UIEvent::new_inherited(EventTypeId::KeyboardEvent),
- key: RefCell::new("".into_string()),
- code: RefCell::new("".into_string()),
+ key: RefCell::new("".to_owned()),
+ code: RefCell::new("".to_owned()),
location: Cell::new(0),
ctrl: Cell::new(false),
alt: Cell::new(false),
@@ -83,7 +85,7 @@ impl KeyboardEvent {
key_code: u32) -> Temporary<KeyboardEvent> {
let ev = KeyboardEvent::new_uninitialized(window).root();
ev.r().InitKeyboardEvent(type_, canBubble, cancelable, view, key, location,
- "".into_string(), repeat, "".into_string());
+ "".to_owned(), repeat, "".to_owned());
*ev.r().code.borrow_mut() = code;
ev.r().ctrl.set(ctrlKey);
ev.r().alt.set(altKey);