input: Fix warnings without wayland feature
@@ -3,7 +3,6 @@ use std::{
fs::File,
io::{Seek, Write},
os::unix::prelude::{AsRawFd, FromRawFd, RawFd},
- path::PathBuf,
};
use nix::{
@@ -13,8 +12,8 @@ use nix::{
use slog::error;
#[derive(Debug)]
-pub(crate) struct KeymapFile {
#[allow(dead_code)]
+pub(crate) struct KeymapFile {
sealed: Option<SealedFile>,
keymap: CString,
}
@@ -38,6 +37,8 @@ impl KeymapFile {
where
F: FnOnce(RawFd, usize),
{
+ use std::path::PathBuf;
+
if let Some(file) = supports_sealed.then(|| self.sealed.as_ref()).flatten() {
cb(file.as_raw_fd(), file.size);
Ok(())
