mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
Fix CI warnings (#1898)
* Fix CI warnings * Use the panic! macro rather than format! + panic_any
This commit is contained in:
@@ -17,6 +17,7 @@ use stdweb::web::event::{
|
||||
use stdweb::web::html_element::CanvasElement;
|
||||
use stdweb::web::{document, EventListenerHandle, IElement, IEventTarget, IHtmlElement};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct Canvas {
|
||||
/// Note: resizing the CanvasElement should go through `backend::set_canvas_size` to ensure the DPI factor is maintained.
|
||||
raw: CanvasElement,
|
||||
|
||||
@@ -18,6 +18,7 @@ use web_sys::{
|
||||
mod mouse_handler;
|
||||
mod pointer_handler;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct Canvas {
|
||||
common: Common,
|
||||
on_focus: Option<EventListenerHandle<dyn FnMut(FocusEvent)>>,
|
||||
|
||||
@@ -8,6 +8,7 @@ use std::rc::Rc;
|
||||
|
||||
use web_sys::{EventTarget, MouseEvent};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(super) struct MouseHandler {
|
||||
on_mouse_leave: Option<EventListenerHandle<dyn FnMut(MouseEvent)>>,
|
||||
on_mouse_enter: Option<EventListenerHandle<dyn FnMut(MouseEvent)>>,
|
||||
|
||||
@@ -5,6 +5,7 @@ use crate::event::{ModifiersState, MouseButton};
|
||||
|
||||
use web_sys::PointerEvent;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(super) struct PointerHandler {
|
||||
on_cursor_leave: Option<EventListenerHandle<dyn FnMut(PointerEvent)>>,
|
||||
on_cursor_enter: Option<EventListenerHandle<dyn FnMut(PointerEvent)>>,
|
||||
|
||||
Reference in New Issue
Block a user