Skip to content
Permalink
Browse files

Refine a lifetime parameter on TElement's get_local_name

  • Loading branch information
Cameron Zwarich
Cameron Zwarich committed Oct 1, 2014
1 parent e894499 commit ccc5d976f7c56d9f42c39667a5844318ef618df2
Showing with 6 additions and 6 deletions.
  1. +2 −2 components/layout/wrapper.rs
  2. +2 −2 components/script/dom/element.rs
  3. +2 −2 components/style/node.rs
@@ -395,12 +395,12 @@ impl<'le> LayoutElement<'le> {

impl<'le> TElement<'le> for LayoutElement<'le> {
#[inline]
fn get_local_name<'a>(&'a self) -> &'a Atom {
fn get_local_name(&self) -> &'le Atom {
&self.element.local_name
}

#[inline]
fn get_namespace<'a>(&'a self) -> &'a Namespace {
fn get_namespace(&self) -> &'le Namespace {
&self.element.namespace
}

@@ -965,7 +965,7 @@ impl<'a> style::TElement<'a> for JSRef<'a, Element> {
_ => None,
}
}
fn get_local_name<'b>(&'b self) -> &'b Atom {
fn get_local_name(&self) -> &'a Atom {
// FIXME(zwarich): Remove this when UFCS lands and there is a better way
// of disambiguating methods.
fn get_local_name<'a, T: ElementHelpers<'a>>(this: T) -> &'a Atom {
@@ -974,7 +974,7 @@ impl<'a> style::TElement<'a> for JSRef<'a, Element> {

get_local_name(*self)
}
fn get_namespace<'b>(&'b self) -> &'b Namespace {
fn get_namespace(&self) -> &'a Namespace {
// FIXME(zwarich): Remove this when UFCS lands and there is a better way
// of disambiguating methods.
fn get_namespace<'a, T: ElementHelpers<'a>>(this: T) -> &'a Namespace {
@@ -24,8 +24,8 @@ pub trait TNode<'a, E: TElement<'a>> : Clone {
pub trait TElement<'a> {
fn get_attr(&self, namespace: &Namespace, attr: &str) -> Option<&'a str>;
fn get_link(&self) -> Option<&'a str>;
fn get_local_name<'b>(&'b self) -> &'b Atom;
fn get_namespace<'b>(&'b self) -> &'b Namespace;
fn get_local_name(&self) -> &'a Atom;
fn get_namespace(&self) -> &'a Namespace;
fn get_hover_state(&self) -> bool;
fn get_id(&self) -> Option<Atom>;
fn get_disabled_state(&self) -> bool;

0 comments on commit ccc5d97

Please sign in to comment.
You can’t perform that action at this time.