winit-sonoma-fix/examples/monitor_list.rs
Lúcás Meier 55640a91ae Use consistent return types for available_monitors() ()
* [] 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`.

* [] Update changelog

* [] Remove AvailableMonitorsIter type completely

* [] Remove doc references to AvailableMonitorsIter
2019-10-05 10:49:24 -04:00

10 lines
276 B
Rust

use winit::{event_loop::EventLoop, window::WindowBuilder};
fn main() {
let event_loop = EventLoop::new();
let window = WindowBuilder::new().build(&event_loop).unwrap();
dbg!(window.available_monitors().collect::<Vec<_>>());
dbg!(window.primary_monitor());
}