Skip to content

Commit 1c9f2ef

Browse files
phip1611nicholasbishop
authored andcommitted
uefi: simplify return type of GraphicsOutput::modes
1 parent bd80766 commit 1c9f2ef

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
`impl Iterator` which simplifies usage.
2828
- `BootServices::exit_boot_services()` now returns `MemoryMapIter` instead of
2929
`impl Iterator` which simplifies usage.
30+
- `GraphicsOutput::modes()` now returns `ModesIter` instead of `impl Iterator`
31+
which simplifies usage.
3032

3133
### Removed
3234

uefi/src/proto/console/gop.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl<'boot> GraphicsOutput<'boot> {
109109

110110
/// Returns information about all available graphics modes.
111111
#[must_use]
112-
pub fn modes(&'_ self) -> impl ExactSizeIterator<Item = Mode> + '_ {
112+
pub fn modes(&self) -> ModeIter {
113113
ModeIter {
114114
gop: self,
115115
current: 0,
@@ -437,8 +437,8 @@ impl ModeInfo {
437437
}
438438
}
439439

440-
/// Iterator for graphics modes.
441-
struct ModeIter<'gop> {
440+
/// Iterator for [`Mode`]s of the [`GraphicsOutput`] protocol.
441+
pub struct ModeIter<'gop> {
442442
gop: &'gop GraphicsOutput<'gop>,
443443
current: u32,
444444
max: u32,

0 commit comments

Comments
 (0)