mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 19:31:30 +11:00
Fixed some compiler warnings
This commit is contained in:
parent
29721b0eeb
commit
b62382bf0c
|
@ -25,7 +25,7 @@ impl StdError for Error {
|
|||
}
|
||||
}
|
||||
|
||||
fn cause(&self) -> Option<&StdError> {
|
||||
fn cause(&self) -> Option<&dyn StdError> {
|
||||
match *self {
|
||||
Error::MenusNotSupported => None,
|
||||
Error::MenuExists(_) => None,
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::mem;
|
|||
use {Key, KeyRepeat, InputCallback};
|
||||
|
||||
pub struct KeyHandler {
|
||||
pub key_callback: Option<Box<InputCallback>>,
|
||||
pub key_callback: Option<Box<dyn InputCallback>>,
|
||||
prev_time: f64,
|
||||
delta_time: f32,
|
||||
keys: [bool; 512],
|
||||
|
@ -70,7 +70,7 @@ impl KeyHandler {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_input_callback(&mut self, callback: Box<InputCallback>) {
|
||||
pub fn set_input_callback(&mut self, callback: Box<dyn InputCallback>) {
|
||||
self.key_callback = Some(callback);
|
||||
}
|
||||
|
||||
|
|
|
@ -512,7 +512,7 @@ impl Window {
|
|||
/// Set input callback to recive callback on char input
|
||||
///
|
||||
#[inline]
|
||||
pub fn set_input_callback(&mut self, callback: Box<InputCallback>) {
|
||||
pub fn set_input_callback(&mut self, callback: Box<dyn InputCallback>) {
|
||||
self.0.set_input_callback(callback)
|
||||
}
|
||||
|
||||
|
|
|
@ -534,7 +534,7 @@ impl Window {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_input_callback(&mut self, callback: Box<InputCallback>) {
|
||||
pub fn set_input_callback(&mut self, callback: Box<dyn InputCallback>) {
|
||||
self.key_handler.set_input_callback(callback)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue