aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-05-04 10:17:32 +0200
committerMs2ger <ms2ger@gmail.com>2014-05-04 10:17:32 +0200
commit11ea7d4935ac9c5e849d9561aa8c176eb6d71a06 (patch)
tree0054a3a0c68c4ecf6cf892492d152d7859e77ad7 /src
parent0ff86107278466b9c1cfd4f2ed9ab8a2daefe13a (diff)
downloadservo-11ea7d4935ac9c5e849d9561aa8c176eb6d71a06.tar.gz
servo-11ea7d4935ac9c5e849d9561aa8c176eb6d71a06.zip
Call find_equiv to avoid allocation strings.
Diffstat (limited to 'src')
-rw-r--r--src/components/style/selector_matching.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/style/selector_matching.rs b/src/components/style/selector_matching.rs
index c8e84e24ae4..f728b3dd7ed 100644
--- a/src/components/style/selector_matching.rs
+++ b/src/components/style/selector_matching.rs
@@ -1004,9 +1004,9 @@ mod tests {
let rules_list = get_mock_rules([".intro.foo", "#top"]);
let mut selector_map = SelectorMap::new();
selector_map.insert(rules_list[1][0].clone());
- assert_eq!(1, selector_map.id_hash.find(&~"top").unwrap()[0].property.source_order);
+ assert_eq!(1, selector_map.id_hash.find_equiv(& &"top").unwrap()[0].property.source_order);
selector_map.insert(rules_list[0][0].clone());
- assert_eq!(0, selector_map.class_hash.find(&~"intro").unwrap()[0].property.source_order);
- assert!(selector_map.class_hash.find(&~"foo").is_none());
+ assert_eq!(0, selector_map.class_hash.find_equiv(& &"intro").unwrap()[0].property.source_order);
+ assert!(selector_map.class_hash.find_equiv(& &"foo").is_none());
}
}