warnings: Fix and silence

This commit is contained in:
Dorota Czaplejewicz
2019-10-09 08:15:03 +00:00
parent da5a83f367
commit 10bad4ebe3
4 changed files with 5 additions and 6 deletions

View File

@ -644,7 +644,7 @@ mod tests {
/// First fallback should be to builtin, not to FALLBACK_LAYOUT_NAME /// First fallback should be to builtin, not to FALLBACK_LAYOUT_NAME
#[test] #[test]
fn fallbacks_order() { fn fallbacks_order() {
let (layout, source, _failure) = load_layout( let (_layout, source, _failure) = load_layout(
"nb", "nb",
Some(PathBuf::from("tests")) Some(PathBuf::from("tests"))
); );

View File

@ -16,10 +16,6 @@ use std::iter::{ FromIterator, IntoIterator };
pub mod c { pub mod c {
use super::*; use super::*;
use ::util::c; use ::util::c;
use ::util::c::as_cstr;
use std::ffi::CString;
use std::os::raw::c_char;
pub type CKeyState = c::Wrapped<KeyState>; pub type CKeyState = c::Wrapped<KeyState>;

View File

@ -253,6 +253,8 @@ pub mod c {
angle: i32 angle: i32
) -> u32; ) -> u32;
// CKeyState is safe to pass to C as long as nothing dereferences it
#[allow(improper_ctypes)]
pub fn eek_keyboard_set_key_locked( pub fn eek_keyboard_set_key_locked(
keyboard: *mut LevelKeyboard, keyboard: *mut LevelKeyboard,
key: ::keyboard::c::CKeyState, key: ::keyboard::c::CKeyState,

View File

@ -1,6 +1,7 @@
#[macro_use] #[macro_use]
extern crate bitflags; extern crate bitflags;
#[macro_use] #[allow(unused_imports)]
#[macro_use] // only for tests
extern crate maplit; extern crate maplit;
extern crate serde; extern crate serde;
extern crate xkbcommon; extern crate xkbcommon;