warnings: Fix and silence
This commit is contained in:
@ -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"))
|
||||||
);
|
);
|
||||||
|
|||||||
@ -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>;
|
||||||
|
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user