arch, qcow: Fix 1.42.0 clippy warnings

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-03-13 12:14:09 +01:00
committed by Rob Bradford
parent 6ea85ca86c
commit 134e64c612
3 changed files with 6 additions and 6 deletions

View File

@@ -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)?;