Skip to content

Commit bd80766

Browse files
phip1611nicholasbishop
authored andcommitted
uefi: optimize MemoryMapIter
1 parent d8b7948 commit bd80766

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

uefi/src/table/boot.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,11 @@ impl<'buf> Iterator for MemoryMapIter<'buf> {
21082108
}
21092109
}
21102110

2111-
impl ExactSizeIterator for MemoryMapIter<'_> {}
2111+
impl ExactSizeIterator for MemoryMapIter<'_> {
2112+
fn len(&self) -> usize {
2113+
self.len
2114+
}
2115+
}
21122116

21132117
/// The type of handle search to perform.
21142118
#[derive(Debug, Copy, Clone)]

0 commit comments

Comments
 (0)