diff options
Diffstat (limited to 'components/devtools_traits/lib.rs')
-rw-r--r-- | components/devtools_traits/lib.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/components/devtools_traits/lib.rs b/components/devtools_traits/lib.rs index 158a01272f6..14c6c59b56c 100644 --- a/components/devtools_traits/lib.rs +++ b/components/devtools_traits/lib.rs @@ -9,9 +9,10 @@ #![crate_name = "devtools_traits"] #![crate_type = "rlib"] +#![feature(int_uint)] + #![allow(non_snake_case)] #![allow(missing_copy_implementations)] -#![feature(globs)] extern crate "msg" as servo_msg; extern crate serialize; @@ -27,6 +28,8 @@ use servo_msg::constellation_msg::PipelineId; use servo_util::str::DOMString; use url::Url; +use std::sync::mpsc::{Sender, Receiver}; + pub type DevtoolsControlChan = Sender<DevtoolsControlMsg>; pub type DevtoolsControlPort = Receiver<DevtoolScriptControlMsg>; @@ -99,14 +102,14 @@ pub enum ScriptDevtoolControlMsg { ReportConsoleMsg(String), } -#[deriving(Encodable)] +#[derive(Encodable)] pub struct Modification{ pub attributeName: String, pub newValue: Option<String>, } -impl<D:Decoder<E>, E> Decodable<D, E> for Modification { - fn decode(d: &mut D) -> Result<Modification, E> { +impl Decodable for Modification { + fn decode<D: Decoder>(d: &mut D) -> Result<Modification, D::Error> { d.read_struct("Modification", 2u, |d| Ok(Modification { attributeName: try!(d.read_struct_field("attributeName", 0u, |d| Decodable::decode(d))), |