Remove HashCache.

This commit is contained in:
Ms2ger 2016-07-07 12:17:13 +02:00
parent 24fe6bc4da
commit fa05a309f3
2 changed files with 2 additions and 64 deletions

View file

@ -3,20 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::cell::Cell;
use util::cache::{HashCache, LRUCache};
#[test]
fn test_hashcache() {
let mut cache: HashCache<usize, Cell<&str>> = HashCache::new();
cache.insert(1, Cell::new("one"));
assert!(cache.find(&1).is_some());
assert!(cache.find(&2).is_none());
cache.find_or_create(2, || { Cell::new("two") });
assert!(cache.find(&1).is_some());
assert!(cache.find(&2).is_some());
}
use util::cache::LRUCache;
#[test]
fn test_lru_cache() {