Fix warnings (#1742)

This commit is contained in:
Murarth 2020-10-15 11:33:06 -07:00 committed by GitHub
parent 6343059bc0
commit 96809ac659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View file

@ -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]

View file

@ -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;

View file

@ -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.

View file

@ -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);