Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex committed Dec 14, 2024
1 parent 6473d06 commit 64760aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wayland-backend/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub fn print_send_message<Id: Display, Fd: AsRawFd>(

pub(crate) struct DisplaySlice<'a, D>(pub &'a [D]);

impl<'a, D: Display> Display for DisplaySlice<'a, D> {
impl<D: Display> Display for DisplaySlice<'_, D> {
#[cfg_attr(coverage, coverage(off))]
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut it = self.0.iter();
Expand Down
2 changes: 1 addition & 1 deletion wayland-client/src/event_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ impl<State: 'static> QueueHandle<State> {
}
}

impl<'a, State> Drop for QueueFreezeGuard<'a, State> {
impl<State> Drop for QueueFreezeGuard<'_, State> {
fn drop(&mut self) {
let mut lock = self.qh.inner.lock().unwrap();
lock.freeze_count -= 1;
Expand Down
2 changes: 1 addition & 1 deletion wayland-server/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub struct DataInit<'a, D: 'static> {
pub(crate) error: &'a mut Option<(u32, String)>,
}

impl<'a, D> DataInit<'a, D> {
impl<D> DataInit<'_, D> {
/// Initialize an object by assigning it its user-data
pub fn init<I: Resource + 'static, U: Send + Sync + 'static>(
&mut self,
Expand Down
1 change: 1 addition & 0 deletions wayland-sys/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ pub mod signal {
// Safety: the signal pointer is valid
unsafe {
list_for_each!(l, &mut (*signal).listener_list as *mut wl_list, wl_listener, link, {
#[allow(unknown_lints, unpredictable_function_pointer_comparisons)]
if (*l).notify == notify {
return l;
}
Expand Down

0 comments on commit 64760aa

Please sign in to comment.