diff --git a/src/blob.rs b/src/blob.rs index 074ed3a76..ca88217ea 100644 --- a/src/blob.rs +++ b/src/blob.rs @@ -538,7 +538,7 @@ impl<'a> Iterator for BlobDirIter<'a> { type Item = BlobObject<'a>; fn next(&mut self) -> Option { - while let Some(path) = self.iter.next() { + for path in self.iter.as_ref() { // In theory this can error but we'd have corrupted filenames in the blobdir, so // silently skipping them is fine. match BlobObject::from_path(self.context, path) {