diff --git a/wayland-backend/src/rs/client_impl/mod.rs b/wayland-backend/src/rs/client_impl/mod.rs index 8001fa3e623..2e1f841a373 100644 --- a/wayland-backend/src/rs/client_impl/mod.rs +++ b/wayland-backend/src/rs/client_impl/mod.rs @@ -28,8 +28,6 @@ use super::{ wire::MessageParseError, }; -pub use crate::types::client::{InvalidId, NoWaylandLib, WaylandError}; - #[derive(Debug, Clone)] struct Data { client_destroyed: bool, @@ -407,7 +405,7 @@ impl InnerBackend { // Prepare the message in a debug-compatible way let args = args.into_iter().map(|arg| { if let Argument::NewId(ObjectId { id: p }) = arg { - if !p.id == 0 { + if p.id != 0 { panic!("The newid provided when sending request {}@{}.{} is not a placeholder.", object.interface.name, id.id, message_desc.name); } if let Some((child_id, child_serial, child_interface)) = child { diff --git a/wayland-backend/src/rs/wire.rs b/wayland-backend/src/rs/wire.rs index 239e20466ee..76dddd7b265 100644 --- a/wayland-backend/src/rs/wire.rs +++ b/wayland-backend/src/rs/wire.rs @@ -1,7 +1,6 @@ //! Types and routines used to manipulate arguments from the wire format use std::collections::VecDeque; -use std::convert::TryInto; use std::ffi::CStr; use std::os::unix::io::RawFd; use std::os::unix::io::{BorrowedFd, OwnedFd}; diff --git a/wayland-backend/src/sys/client_impl/mod.rs b/wayland-backend/src/sys/client_impl/mod.rs index 6939314fe76..dfd33703247 100644 --- a/wayland-backend/src/sys/client_impl/mod.rs +++ b/wayland-backend/src/sys/client_impl/mod.rs @@ -29,8 +29,6 @@ use smallvec::SmallVec; use wayland_sys::{client::*, common::*, ffi_dispatch}; -pub use crate::types::client::{InvalidId, NoWaylandLib, WaylandError}; - use super::{free_arrays, RUST_MANAGED}; use super::client::*; diff --git a/wayland-backend/src/sys/server_impl/mod.rs b/wayland-backend/src/sys/server_impl/mod.rs index 56033eddf6b..f0d9c7c545f 100644 --- a/wayland-backend/src/sys/server_impl/mod.rs +++ b/wayland-backend/src/sys/server_impl/mod.rs @@ -25,6 +25,7 @@ use wayland_sys::{common::*, ffi_dispatch, server::*}; use super::{free_arrays, server::*, RUST_MANAGED}; +#[allow(unused_imports)] pub use crate::types::server::{Credentials, DisconnectReason, GlobalInfo, InitError, InvalidId}; scoped_thread_local! { diff --git a/wayland-server/src/socket.rs b/wayland-server/src/socket.rs index 1b594ab1b5e..d25c21ecf3f 100644 --- a/wayland-server/src/socket.rs +++ b/wayland-server/src/socket.rs @@ -86,6 +86,7 @@ impl ListeningSocket { .create(true) .read(true) .write(true) + .truncate(true) .mode(0o660) .open(&lock_path) .map_err(|_| BindError::PermissionDenied)?;