mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Fix warnings (#1742)
This commit is contained in:
parent
6343059bc0
commit
96809ac659
|
@ -130,7 +130,7 @@
|
|||
//! [`raw_window_handle`]: ./window/struct.Window.html#method.raw_window_handle
|
||||
|
||||
#![deny(rust_2018_idioms)]
|
||||
#![deny(intra_doc_link_resolution_failure)]
|
||||
#![deny(broken_intra_doc_links)]
|
||||
|
||||
#[allow(unused_imports)]
|
||||
#[macro_use]
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
// incoming events (from the registered handlers) and ensuring they are passed to the user in a
|
||||
// compliant way.
|
||||
|
||||
// Silence warnings from use of deprecated stdweb backend
|
||||
#![allow(deprecated)]
|
||||
|
||||
mod device;
|
||||
mod error;
|
||||
mod event_loop;
|
||||
|
|
|
@ -15,9 +15,7 @@ use stdweb::web::event::{
|
|||
PointerOutEvent, PointerOverEvent, PointerUpEvent,
|
||||
};
|
||||
use stdweb::web::html_element::CanvasElement;
|
||||
use stdweb::web::{
|
||||
document, EventListenerHandle, IChildNode, IElement, IEventTarget, IHtmlElement,
|
||||
};
|
||||
use stdweb::web::{document, EventListenerHandle, IElement, IEventTarget, IHtmlElement};
|
||||
|
||||
pub struct Canvas {
|
||||
/// Note: resizing the CanvasElement should go through `backend::set_canvas_size` to ensure the DPI factor is maintained.
|
||||
|
|
|
@ -63,8 +63,6 @@ pub fn scale_factor() -> f64 {
|
|||
}
|
||||
|
||||
pub fn set_canvas_size(raw: &CanvasElement, size: Size) {
|
||||
use stdweb::*;
|
||||
|
||||
let scale_factor = scale_factor();
|
||||
|
||||
let physical_size = size.to_physical::<u32>(scale_factor);
|
||||
|
|
Loading…
Reference in a new issue