Auto merge of #20027 - emilio:bye-ordermap, r=nox

style: Back out ordermap.

It was worth a shot!

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20027)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-02-12 07:36:04 -05:00 committed by GitHub
commit 889bb012ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 3 additions and 384 deletions

View file

@ -9,15 +9,10 @@
use fnv;
// #[cfg(feature = "gecko")]
// pub use hashglobe::hash_map::HashMap;
// #[cfg(feature = "gecko")]
// pub use hashglobe::hash_set::HashSet;
#[cfg(feature = "gecko")]
pub use hashglobe::order::HashMap;
pub use hashglobe::hash_map::HashMap;
#[cfg(feature = "gecko")]
pub use hashglobe::order::HashSet;
pub use hashglobe::hash_set::HashSet;
#[cfg(feature = "servo")]
pub use hashglobe::fake::{HashMap, HashSet};
@ -25,10 +20,8 @@ pub use hashglobe::fake::{HashMap, HashSet};
/// Appropriate reexports of hash_map types
pub mod map {
// #[cfg(feature = "gecko")]
// pub use hashglobe::hash_map::{Entry, Iter};
#[cfg(feature = "gecko")]
pub use hashglobe::order::{Entry, MapIter as Iter};
pub use hashglobe::hash_map::{Entry, Iter};
#[cfg(feature = "servo")]
pub use std::collections::hash_map::{Entry, Iter};
}

View file

@ -513,7 +513,6 @@ impl<V: 'static> MaybeCaseInsensitiveHashMap<Atom, V> {
}
/// HashMap::try_entry
#[cfg(not(feature = "gecko"))]
pub fn try_entry(
&mut self,
mut key: Atom,
@ -525,22 +524,6 @@ impl<V: 'static> MaybeCaseInsensitiveHashMap<Atom, V> {
self.0.try_entry(key)
}
/// HashMap::try_entry
///
/// FIXME(emilio): Remove the extra Entry parameter and unify when ordermap
/// 0.4 is released.
#[cfg(feature = "gecko")]
pub fn try_entry(
&mut self,
mut key: Atom,
quirks_mode: QuirksMode,
) -> Result<hash_map::Entry<Atom, V, BuildHasherDefault<PrecomputedHasher>>, FailedAllocationError> {
if quirks_mode == QuirksMode::Quirks {
key = key.to_ascii_lowercase()
}
self.0.try_entry(key)
}
/// HashMap::iter
pub fn iter(&self) -> hash_map::Iter<Atom, V> {
self.0.iter()