clean up warnings from github

This commit is contained in:
i509VCB 2021-11-22 13:46:34 -06:00 committed by Victor Berger
parent 2db2611817
commit 7b1c0501f3
7 changed files with 13 additions and 25 deletions

View File

@ -85,7 +85,8 @@ impl WindowSize {
#[derive(Debug)]
pub struct WinitGraphicsBackend {
renderer: Gles2Renderer,
display: EGLDisplay,
// The display isn't used past this point but must be kept alive.
_display: EGLDisplay,
egl: Rc<EGLSurface>,
window: Rc<WinitWindow>,
size: Rc<RefCell<WindowSize>>,
@ -223,7 +224,7 @@ where
Ok((
WinitGraphicsBackend {
window: window.clone(),
display,
_display: display,
egl,
renderer,
size: size.clone(),

View File

@ -83,7 +83,7 @@ use x11rb::{
protocol::{
self as x11,
dri3::ConnectionExt as _,
xproto::{ColormapAlloc, ConnectionExt, Depth, PixmapWrapper, VisualClass},
xproto::{ColormapAlloc, ConnectionExt, PixmapWrapper, VisualClass},
ErrorKind,
},
rust_connection::{ReplyError, RustConnection},
@ -124,8 +124,6 @@ pub struct X11Backend {
window: Arc<WindowInner>,
resize: Sender<Size<u16, Logical>>,
key_counter: Arc<AtomicU32>,
depth: Depth,
visual_id: u32,
}
atom_manager! {
@ -231,7 +229,7 @@ impl X11Backend {
title,
format,
atoms,
depth.clone(),
depth,
visual_id,
colormap,
extensions,
@ -254,8 +252,6 @@ impl X11Backend {
connection,
window,
key_counter: Arc::new(AtomicU32::new(0)),
depth,
visual_id,
screen_number,
resize: resize_send,
};

View File

@ -57,7 +57,6 @@ pub(crate) struct WindowInner {
pub connection: Weak<RustConnection>,
pub id: x11::Window,
root: x11::Window,
present_event_id: u32,
pub atoms: Atoms,
pub cursor_state: Arc<Mutex<CursorState>>,
pub size: Mutex<Size<u16, Logical>>,
@ -147,7 +146,6 @@ impl WindowInner {
connection: weak,
id: window,
root: screen.root,
present_event_id,
atoms,
cursor_state: Arc::new(Mutex::new(CursorState::default())),
size: Mutex::new(size),

View File

@ -29,7 +29,7 @@ struct Inner {
scale: i32,
instances: Vec<ZxdgOutputV1>,
log: ::slog::Logger,
_log: ::slog::Logger,
}
#[derive(Debug, Clone)]
@ -58,7 +58,7 @@ impl XdgOutput {
scale: output.scale,
instances: Vec::new(),
log,
_log: log,
})),
}
}

View File

@ -165,7 +165,7 @@ impl LayerShellState {
#[derive(Clone)]
struct ShellUserData {
log: ::slog::Logger,
_log: ::slog::Logger,
user_impl: Rc<RefCell<dyn FnMut(LayerShellRequest, DispatchData<'_>)>>,
shell_state: Arc<Mutex<LayerShellState>>,
}
@ -189,7 +189,7 @@ where
}));
let shell_data = ShellUserData {
log: log.new(slog::o!("smithay_module" => "layer_shell_handler")),
_log: log.new(slog::o!("smithay_module" => "layer_shell_handler")),
user_impl: Rc::new(RefCell::new(implementation)),
shell_state: shell_state.clone(),
};

View File

@ -133,7 +133,7 @@ impl XdgActivationTokenData {
/// Tracks the list of pending and current activation requests
#[derive(Debug)]
pub struct XdgActivationState {
log: ::slog::Logger,
_log: ::slog::Logger,
user_data: UserDataMap,
pending_tokens: HashMap<XdgActivationToken, XdgActivationTokenData>,
@ -203,7 +203,7 @@ where
let implementation = Rc::new(RefCell::new(implementation));
let activation_state = Arc::new(Mutex::new(XdgActivationState {
log: log.new(slog::o!("smithay_module" => "xdg_activation_handler")),
_log: log.new(slog::o!("smithay_module" => "xdg_activation_handler")),
user_data: UserDataMap::new(),
pending_tokens: HashMap::new(),
activation_requests: HashMap::new(),

View File

@ -47,8 +47,7 @@ use wayland_server::{Display, Filter, Global, Main};
/// Manages all exported and imported surfaces.
#[derive(Debug)]
pub struct XdgForeignState {
log: ::slog::Logger,
shell: Arc<Mutex<ShellState>>,
_log: ::slog::Logger,
exports: Vec<Export>,
}
@ -85,9 +84,8 @@ where
let log = crate::slog_or_fallback(logger);
let state = Arc::new(Mutex::new(XdgForeignState {
log: log.new(slog::o!("smithay_module" => "xdg_foreign_handler")),
_log: log.new(slog::o!("smithay_module" => "xdg_foreign_handler")),
exports: vec![],
shell: xdg_shell_state.clone(),
}));
// Borrow checking does not like us cloning the state inside the filter's closure so we clone
@ -121,8 +119,6 @@ struct Export {
inner: zxdg_exported_v2::ZxdgExportedV2,
/// All imports made from this export.
imports: Vec<Import>,
/// Whether this export was created by the compositor or a client.
compositor_created: bool,
}
impl Export {
@ -152,7 +148,6 @@ impl PartialEq for Export {
struct Import {
inner: zxdg_imported_v2::ZxdgImportedV2,
surface: WlSurface,
handle: String,
/// Child surfaces which have imported this surface as a parent.
children: Vec<WlSurface>,
}
@ -291,7 +286,6 @@ fn exporter_implementation(
handle: handle.clone(),
inner: id.deref().clone(),
imports: vec![],
compositor_created: false,
});
handle
@ -370,7 +364,6 @@ fn importer_implementation(
export.imports.push(Import {
inner,
surface: export.surface.clone(),
handle: export.handle.clone(),
children: vec![],
});
}