Use consistent return types for available_monitors() (#1207)
* [#1111] Use consistent return types for available_monitors() Always use `impl Iterator<Item = MonitorHandle>` instead of `AvailableMonitorsIter`. Fix an example that used the Debug implementation of `AvailableMonitorsIter`. * [#1111] Update changelog * [#1111] Remove AvailableMonitorsIter type completely * [#1111] Remove doc references to AvailableMonitorsIter
This commit is contained in:
parent
4f6ca8792c
commit
55640a91ae
5 changed files with 15 additions and 50 deletions
|
|
@ -11,11 +11,7 @@
|
|||
//! [send_event]: ./struct.EventLoopProxy.html#method.send_event
|
||||
use std::{error, fmt, ops::Deref, time::Instant};
|
||||
|
||||
use crate::{
|
||||
event::Event,
|
||||
monitor::{AvailableMonitorsIter, MonitorHandle},
|
||||
platform_impl,
|
||||
};
|
||||
use crate::{event::Event, monitor::MonitorHandle, platform_impl};
|
||||
|
||||
/// Provides a way to retrieve events from the system and from the windows that were registered to
|
||||
/// the events loop.
|
||||
|
|
@ -150,10 +146,10 @@ impl<T> EventLoop<T> {
|
|||
/// Returns the list of all the monitors available on the system.
|
||||
#[inline]
|
||||
pub fn available_monitors(&self) -> impl Iterator<Item = MonitorHandle> {
|
||||
let data = self.event_loop.available_monitors();
|
||||
AvailableMonitorsIter {
|
||||
data: data.into_iter(),
|
||||
}
|
||||
self.event_loop
|
||||
.available_monitors()
|
||||
.into_iter()
|
||||
.map(|inner| MonitorHandle { inner })
|
||||
}
|
||||
|
||||
/// Returns the primary monitor of the system.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue