mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Simplify internal type construction
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use crate::dpi::{PhysicalPosition, PhysicalSize};
|
||||
use crate::monitor::{MonitorHandle as RootMonitorHandle, VideoMode as RootVideoMode};
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct MonitorHandle;
|
||||
@@ -28,7 +27,7 @@ impl MonitorHandle {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn video_modes(&self) -> impl Iterator<Item = RootVideoMode> {
|
||||
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode> {
|
||||
std::iter::empty()
|
||||
}
|
||||
}
|
||||
@@ -49,9 +48,7 @@ impl VideoMode {
|
||||
32000
|
||||
}
|
||||
|
||||
pub fn monitor(&self) -> RootMonitorHandle {
|
||||
RootMonitorHandle {
|
||||
inner: MonitorHandle,
|
||||
}
|
||||
pub fn monitor(&self) -> MonitorHandle {
|
||||
MonitorHandle
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user