diff --git a/src/components/main/layout/wrapper.rs b/src/components/main/layout/wrapper.rs index 63205ed1da8..75bc94e5b85 100644 --- a/src/components/main/layout/wrapper.rs +++ b/src/components/main/layout/wrapper.rs @@ -413,7 +413,7 @@ impl<'le> TElement for LayoutElement<'le> { unsafe { self.element.get_attr_val_for_layout(namespace, name) } } - fn get_link(&self) -> Option<~str> { + fn get_link(&self) -> Option<&'static str> { // FIXME: This is HTML only. match self.element.node.type_id { // http://www.whatwg.org/specs/web-apps/current-work/multipage/selectors.html# @@ -422,7 +422,6 @@ impl<'le> TElement for LayoutElement<'le> { ElementNodeTypeId(HTMLAreaElementTypeId) | ElementNodeTypeId(HTMLLinkElementTypeId) => { unsafe { self.element.get_attr_val_for_layout(&namespace::Null, "href") } - .map(|val| val.to_owned()) } _ => None, } diff --git a/src/components/style/namespaces.rs b/src/components/style/namespaces.rs index 762b5f7ab0a..a7b2f79deac 100644 --- a/src/components/style/namespaces.rs +++ b/src/components/style/namespaces.rs @@ -40,7 +40,7 @@ pub fn parse_namespace_rule(rule: AtRule, namespaces: &mut NamespaceMap) { }, URL(value) | String(value) => { if ns.is_some() { syntax_error!() } - ns = Some(Namespace::from_str(value.as_slice())); + ns = Some(Namespace::from_str(value)); break }, _ => syntax_error!(), diff --git a/src/components/style/node.rs b/src/components/style/node.rs index 2e22ac0cb89..dc6df8427bd 100644 --- a/src/components/style/node.rs +++ b/src/components/style/node.rs @@ -25,7 +25,7 @@ pub trait TNode : Clone { pub trait TElement { fn get_attr(&self, namespace: &Namespace, attr: &str) -> Option<&'static str>; - fn get_link(&self) -> Option<~str>; + fn get_link(&self) -> Option<&'static str>; fn get_local_name<'a>(&'a self) -> &'a str; fn get_namespace<'a>(&'a self) -> &'a Namespace; }