Fix web errors (#1040)
* Fix old `use` declarations * Fix hidden lifetime parameter * Fix missing methods in `web::Monitor`. Originally fixed by @ryanisaacg in 94387c4bf5bca35f4e24562ce89a4f4badd53aa8. * Disable some tests and examples on `wasm32`
This commit is contained in:
parent
53e646dabc
commit
7b23d190b1
10 changed files with 65 additions and 36 deletions
|
|
@ -4,7 +4,7 @@ use std::fmt;
|
|||
pub struct OsError(pub String);
|
||||
|
||||
impl fmt::Display for OsError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
use crate::dpi::{PhysicalPosition, PhysicalSize};
|
||||
use crate::monitor::VideoMode;
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct Handle;
|
||||
|
|
@ -12,11 +13,16 @@ impl Handle {
|
|||
unimplemented!();
|
||||
}
|
||||
|
||||
pub fn dimensions(&self) -> PhysicalSize {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
pub fn name(&self) -> Option<String> {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
pub fn size(&self) -> PhysicalSize {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode> {
|
||||
// TODO: is this possible ?
|
||||
std::iter::empty()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue