mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Complete FIXMEs related to UFCS
This commit is contained in:
parent
12195a5c4a
commit
78d2fe6e9b
2 changed files with 4 additions and 28 deletions
|
@ -1645,22 +1645,10 @@ impl<'a> ::selectors::Element for &'a Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_local_name<'b>(&'b self) -> &'b Atom {
|
fn get_local_name<'b>(&'b self) -> &'b Atom {
|
||||||
// FIXME(zwarich): Remove this when UFCS lands and there is a better way
|
ElementHelpers::local_name(*self)
|
||||||
// of disambiguating methods.
|
|
||||||
fn get_local_name<'a, T: ElementHelpers<'a>>(this: T) -> &'a Atom {
|
|
||||||
this.local_name()
|
|
||||||
}
|
|
||||||
|
|
||||||
get_local_name(*self)
|
|
||||||
}
|
}
|
||||||
fn get_namespace<'b>(&'b self) -> &'b Namespace {
|
fn get_namespace<'b>(&'b self) -> &'b Namespace {
|
||||||
// FIXME(zwarich): Remove this when UFCS lands and there is a better way
|
self.namespace()
|
||||||
// of disambiguating methods.
|
|
||||||
fn get_namespace<'a, T: ElementHelpers<'a>>(this: T) -> &'a Namespace {
|
|
||||||
this.namespace()
|
|
||||||
}
|
|
||||||
|
|
||||||
get_namespace(*self)
|
|
||||||
}
|
}
|
||||||
fn get_hover_state(&self) -> bool {
|
fn get_hover_state(&self) -> bool {
|
||||||
let node = NodeCast::from_ref(*self);
|
let node = NodeCast::from_ref(*self);
|
||||||
|
@ -1707,13 +1695,7 @@ impl<'a> ::selectors::Element for &'a Element {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn has_class(&self, name: &Atom) -> bool {
|
fn has_class(&self, name: &Atom) -> bool {
|
||||||
// FIXME(zwarich): Remove this when UFCS lands and there is a better way
|
AttributeHandlers::has_class(*self, name)
|
||||||
// of disambiguating methods.
|
|
||||||
fn has_class<T: AttributeHandlers>(this: T, name: &Atom) -> bool {
|
|
||||||
this.has_class(name)
|
|
||||||
}
|
|
||||||
|
|
||||||
has_class(*self, name)
|
|
||||||
}
|
}
|
||||||
fn each_class<F>(&self, mut callback: F)
|
fn each_class<F>(&self, mut callback: F)
|
||||||
where F: FnMut(&Atom)
|
where F: FnMut(&Atom)
|
||||||
|
|
|
@ -2606,13 +2606,7 @@ impl<'a> ::selectors::Node<&'a Element> for &'a Node {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_document(&self) -> bool {
|
fn is_document(&self) -> bool {
|
||||||
// FIXME(zwarich): Remove this when UFCS lands and there is a better way
|
DocumentDerived::is_document(*self)
|
||||||
// of disambiguating methods.
|
|
||||||
fn is_document<'a, T: DocumentDerived>(this: &T) -> bool {
|
|
||||||
this.is_document()
|
|
||||||
}
|
|
||||||
|
|
||||||
is_document(*self)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn as_element(&self) -> Option<&'a Element> {
|
fn as_element(&self) -> Option<&'a Element> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue