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
#[test]
fn fallbacks_order() {
let (layout, source, _failure) = load_layout(
let (_layout, source, _failure) = load_layout(
"nb",
Some(PathBuf::from("tests"))
);

View File

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

View File

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

View File

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