aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/cache.rs
diff options
context:
space:
mode:
authorJack Moffitt <jack@metajack.im>2014-07-21 07:37:24 -0600
committerJack Moffitt <jack@metajack.im>2014-08-02 21:11:47 -0600
commitb91e6f30e063cbcea4ffd750da8385ce448de797 (patch)
tree3e762f7866e29379810ac1e612f7942979e21b87 /src/components/util/cache.rs
parent8b6f62c195dd7e42d0b6a18f2ced6fa16bc29faa (diff)
downloadservo-b91e6f30e063cbcea4ffd750da8385ce448de797.tar.gz
servo-b91e6f30e063cbcea4ffd750da8385ce448de797.zip
Upgrade Rust.
Diffstat (limited to 'src/components/util/cache.rs')
-rw-r--r--src/components/util/cache.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/util/cache.rs b/src/components/util/cache.rs
index b3b32269911..fd4a85161e0 100644
--- a/src/components/util/cache.rs
+++ b/src/components/util/cache.rs
@@ -58,7 +58,7 @@ impl<K: Clone + PartialEq, V: Clone> Cache<K,V> for MonoCache<K,V> {
#[test]
fn test_monocache() {
- let mut cache = MonoCache::new(10);
+ let mut cache: MonoCache<uint,Cell<&str>> = MonoCache::new(10);
let one = Cell::new("one");
let two = Cell::new("two");
cache.insert(1, one);
@@ -105,7 +105,7 @@ impl<K: Clone + PartialEq + Eq + Hash, V: Clone> Cache<K,V> for HashCache<K,V> {
#[test]
fn test_hashcache() {
- let mut cache = HashCache::new();
+ let mut cache: HashCache<uint, Cell<&str>> = HashCache::new();
let one = Cell::new("one");
let two = Cell::new("two");
@@ -252,7 +252,7 @@ fn test_lru_cache() {
let four = Cell::new("four");
// Test normal insertion.
- let mut cache = LRUCache::new(2); // (_, _) (cache is empty)
+ let mut cache: LRUCache<uint,Cell<&str>> = LRUCache::new(2); // (_, _) (cache is empty)
cache.insert(1, one); // (1, _)
cache.insert(2, two); // (1, 2)
cache.insert(3, three); // (2, 3)