summary refs log tree commit diff
path: root/disk
diff options
context:
space:
mode:
Diffstat (limited to 'disk')
-rw-r--r--disk/src/qcow/vec_cache.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk/src/qcow/vec_cache.rs b/disk/src/qcow/vec_cache.rs
index ecd7673..18cfc69 100644
--- a/disk/src/qcow/vec_cache.rs
+++ b/disk/src/qcow/vec_cache.rs
@@ -120,7 +120,7 @@ impl<T: Cacheable> CacheMap<T> {
     {
         if self.map.len() == self.capacity {
             // TODO(dgreid) - smarter eviction strategy.
-            let to_evict = *self.map.iter().nth(0).unwrap().0;
+            let to_evict = *self.map.iter().next().unwrap().0;
             if let Some(evicted) = self.map.remove(&to_evict) {
                 if evicted.dirty() {
                     write_callback(to_evict, evicted)?;