From b62382bf0c4cfb7cbce44fb1585fc077c7c1cb18 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Sun, 21 Jul 2019 10:37:47 +0200 Subject: [PATCH] Fixed some compiler warnings --- src/error.rs | 2 +- src/key_handler.rs | 4 ++-- src/lib.rs | 4 ++-- src/os/unix/mod.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/error.rs b/src/error.rs index 5d7d836..d1170fc 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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, diff --git a/src/key_handler.rs b/src/key_handler.rs index 0a593bf..aa7690e 100644 --- a/src/key_handler.rs +++ b/src/key_handler.rs @@ -4,7 +4,7 @@ use std::mem; use {Key, KeyRepeat, InputCallback}; pub struct KeyHandler { - pub key_callback: Option>, + pub key_callback: Option>, prev_time: f64, delta_time: f32, keys: [bool; 512], @@ -70,7 +70,7 @@ impl KeyHandler { } } - pub fn set_input_callback(&mut self, callback: Box) { + pub fn set_input_callback(&mut self, callback: Box) { self.key_callback = Some(callback); } diff --git a/src/lib.rs b/src/lib.rs index cf6db74..04ed75f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -464,7 +464,7 @@ impl Window { /// /// Check if a single key was released since last call to update. - /// + /// #[inline] pub fn is_key_released(&self, key: Key) -> bool { self.0.is_key_released(key) @@ -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) { + pub fn set_input_callback(&mut self, callback: Box) { self.0.set_input_callback(callback) } diff --git a/src/os/unix/mod.rs b/src/os/unix/mod.rs index 2e0b42a..87171a9 100644 --- a/src/os/unix/mod.rs +++ b/src/os/unix/mod.rs @@ -534,7 +534,7 @@ impl Window { } #[inline] - pub fn set_input_callback(&mut self, callback: Box) { + pub fn set_input_callback(&mut self, callback: Box) { self.key_handler.set_input_callback(callback) }