cleanup(wayland): clippy
This commit is contained in:
@@ -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};
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user