mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Update to selectors 0.14
This commit is contained in:
parent
afa55dcf55
commit
465efd784c
12 changed files with 28 additions and 106 deletions
|
@ -9,8 +9,6 @@ use gecko_bindings::bindings::Gecko_Atomize;
|
|||
use gecko_bindings::bindings::Gecko_ReleaseAtom;
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use heapsize::HeapSizeOf;
|
||||
use selectors::bloom::BloomHash;
|
||||
use selectors::parser::FromCowStr;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::{Cow, Borrow};
|
||||
use std::char::{self, DecodeUtf16};
|
||||
|
@ -180,20 +178,6 @@ impl Atom {
|
|||
}
|
||||
}
|
||||
|
||||
impl BloomHash for Atom {
|
||||
#[inline]
|
||||
fn bloom_hash(&self) -> u32 {
|
||||
self.get_hash()
|
||||
}
|
||||
}
|
||||
|
||||
impl BloomHash for WeakAtom {
|
||||
#[inline]
|
||||
fn bloom_hash(&self) -> u32 {
|
||||
self.get_hash()
|
||||
}
|
||||
}
|
||||
|
||||
impl Hash for Atom {
|
||||
fn hash<H>(&self, state: &mut H) where H: Hasher {
|
||||
state.write_u32(self.get_hash());
|
||||
|
@ -270,13 +254,6 @@ impl<'a> From<Cow<'a, str>> for Atom {
|
|||
}
|
||||
}
|
||||
|
||||
impl FromCowStr for Atom {
|
||||
#[inline]
|
||||
fn from_cow_str(string: Cow<str>) -> Atom {
|
||||
Atom::from(&*string)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for Atom {
|
||||
#[inline]
|
||||
fn from(string: String) -> Atom {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
use selectors::bloom::BloomHash;
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
|
@ -16,6 +15,8 @@ macro_rules! ns {
|
|||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Default, Hash)]
|
||||
pub struct Namespace(pub Atom);
|
||||
|
||||
#[derive(Hash)]
|
||||
pub struct WeakNamespace(WeakAtom);
|
||||
|
||||
impl Deref for Namespace {
|
||||
|
@ -64,17 +65,3 @@ impl PartialEq for WeakNamespace {
|
|||
weak == other
|
||||
}
|
||||
}
|
||||
|
||||
impl BloomHash for Namespace {
|
||||
#[inline]
|
||||
fn bloom_hash(&self) -> u32 {
|
||||
self.0.get_hash()
|
||||
}
|
||||
}
|
||||
|
||||
impl BloomHash for WeakNamespace {
|
||||
#[inline]
|
||||
fn bloom_hash(&self) -> u32 {
|
||||
self.0.get_hash()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue