cleanup(wayland): clippy

This commit is contained in:
Nova
2025-08-11 18:07:43 -07:00
parent 41d6b02506
commit 5383bbedcd
3 changed files with 6 additions and 18 deletions

View File

@@ -21,7 +21,6 @@ use crate::{
},
};
use bevy::app::{App, Plugin, Update};
use bevy::diagnostic::FrameCount;
use bevy::ecs::schedule::IntoScheduleConfigs;
use bevy::ecs::system::{Local, Res, ResMut};
use bevy::prelude::{Deref, DerefMut};

View File

@@ -1,9 +1,7 @@
use std::sync::{Arc, OnceLock};
use rustix::fs::Timespec;
use waynest::{
server::{
self, Client, Dispatcher, Result,
Client, Dispatcher, Result,
protocol::stable::presentation_time::{
wp_presentation::WpPresentation, wp_presentation_feedback::WpPresentationFeedback,
},
@@ -13,17 +11,6 @@ use waynest::{
use crate::wayland::core::surface::Surface;
#[derive(Debug, Dispatcher)]
pub struct Presentation {
version: u32,
}
impl Presentation {
pub fn new(version: u32) -> Presentation {
Self { version }
}
}
pub struct MonotonicTimestamp {
secs: u64,
subsec_nanos: u32,
@@ -50,7 +37,7 @@ impl From<Timespec> for MonotonicTimestamp {
}
#[derive(Debug, Dispatcher)]
pub struct PresentationFeedback(pub ObjectId);
pub struct Presentation;
impl WpPresentation for Presentation {
async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
Ok(())
@@ -73,4 +60,7 @@ impl WpPresentation for Presentation {
Ok(())
}
}
#[derive(Debug, Dispatcher)]
pub struct PresentationFeedback(pub ObjectId);
impl WpPresentationFeedback for PresentationFeedback {}

View File

@@ -191,8 +191,7 @@ impl WlRegistry for Registry {
RegistryGlobals::PRESENTATION => {
tracing::info!("Binding wp_presentation");
let presentation = Presentation::new(new_id.version);
client.insert(new_id.object_id, presentation);
client.insert(new_id.object_id, Presentation);
}
id => {
tracing::error!(id, "Wayland: failed to bind to registry global");