aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--components/selectors/bloom.rs8
-rw-r--r--components/selectors/parser.rs4
3 files changed, 7 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 82507be07e3..52c6dc6a719 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,7 @@ matrix:
- bash etc/ci/check_no_panic.sh
- bash etc/ci/lockfile_changed.sh
- bash etc/ci/manifest_changed.sh
+ - ./mach cargo test -p selectors
cache:
directories:
- .cargo
diff --git a/components/selectors/bloom.rs b/components/selectors/bloom.rs
index 9d64391346d..b60fc1be0b8 100644
--- a/components/selectors/bloom.rs
+++ b/components/selectors/bloom.rs
@@ -106,7 +106,7 @@ impl BloomFilter {
}
#[inline]
- fn insert_hash(&mut self, hash: u32) {
+ pub fn insert_hash(&mut self, hash: u32) {
{
let slot1 = self.first_mut_slot(hash);
if !full(slot1) {
@@ -125,11 +125,10 @@ impl BloomFilter {
#[inline]
pub fn insert<T: Hash>(&mut self, elem: &T) {
self.insert_hash(hash(elem))
-
}
#[inline]
- fn remove_hash(&mut self, hash: u32) {
+ pub fn remove_hash(&mut self, hash: u32) {
{
let slot1 = self.first_mut_slot(hash);
if !full(slot1) {
@@ -151,7 +150,7 @@ impl BloomFilter {
}
#[inline]
- fn might_contain_hash(&self, hash: u32) -> bool {
+ pub fn might_contain_hash(&self, hash: u32) -> bool {
*self.first_slot(hash) != 0 && *self.second_slot(hash) != 0
}
@@ -170,7 +169,6 @@ fn full(slot: &u8) -> bool {
*slot == 0xff
}
-#[inline]
fn hash<T: Hash>(elem: &T) -> u32 {
let mut hasher = FnvHasher::default();
elem.hash(&mut hasher);
diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs
index c921d1fb9b1..3bbbc681c54 100644
--- a/components/selectors/parser.rs
+++ b/components/selectors/parser.rs
@@ -1201,6 +1201,8 @@ pub mod tests {
type PseudoElement = PseudoElement;
}
+ type ShutUpTidy = String;
+
impl Parser for DummyParser {
type Impl = DummySelectorImpl;
@@ -1234,7 +1236,7 @@ pub mod tests {
self.default_ns.clone()
}
- fn namespace_for_prefix(&self, prefix: &str) -> Option<String> {
+ fn namespace_for_prefix(&self, prefix: &ShutUpTidy) -> Option<String> {
self.ns_prefixes.get(prefix).cloned()
}
}