cleanup(wayland): clippy
This commit is contained in:
@@ -21,7 +21,6 @@ use crate::{
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
use bevy::app::{App, Plugin, Update};
|
use bevy::app::{App, Plugin, Update};
|
||||||
use bevy::diagnostic::FrameCount;
|
|
||||||
use bevy::ecs::schedule::IntoScheduleConfigs;
|
use bevy::ecs::schedule::IntoScheduleConfigs;
|
||||||
use bevy::ecs::system::{Local, Res, ResMut};
|
use bevy::ecs::system::{Local, Res, ResMut};
|
||||||
use bevy::prelude::{Deref, DerefMut};
|
use bevy::prelude::{Deref, DerefMut};
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
use std::sync::{Arc, OnceLock};
|
|
||||||
|
|
||||||
use rustix::fs::Timespec;
|
use rustix::fs::Timespec;
|
||||||
use waynest::{
|
use waynest::{
|
||||||
server::{
|
server::{
|
||||||
self, Client, Dispatcher, Result,
|
Client, Dispatcher, Result,
|
||||||
protocol::stable::presentation_time::{
|
protocol::stable::presentation_time::{
|
||||||
wp_presentation::WpPresentation, wp_presentation_feedback::WpPresentationFeedback,
|
wp_presentation::WpPresentation, wp_presentation_feedback::WpPresentationFeedback,
|
||||||
},
|
},
|
||||||
@@ -13,17 +11,6 @@ use waynest::{
|
|||||||
|
|
||||||
use crate::wayland::core::surface::Surface;
|
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 {
|
pub struct MonotonicTimestamp {
|
||||||
secs: u64,
|
secs: u64,
|
||||||
subsec_nanos: u32,
|
subsec_nanos: u32,
|
||||||
@@ -50,7 +37,7 @@ impl From<Timespec> for MonotonicTimestamp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Dispatcher)]
|
#[derive(Debug, Dispatcher)]
|
||||||
pub struct PresentationFeedback(pub ObjectId);
|
pub struct Presentation;
|
||||||
impl WpPresentation for Presentation {
|
impl WpPresentation for Presentation {
|
||||||
async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
|
async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -73,4 +60,7 @@ impl WpPresentation for Presentation {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Dispatcher)]
|
||||||
|
pub struct PresentationFeedback(pub ObjectId);
|
||||||
impl WpPresentationFeedback for PresentationFeedback {}
|
impl WpPresentationFeedback for PresentationFeedback {}
|
||||||
|
|||||||
@@ -191,8 +191,7 @@ impl WlRegistry for Registry {
|
|||||||
RegistryGlobals::PRESENTATION => {
|
RegistryGlobals::PRESENTATION => {
|
||||||
tracing::info!("Binding wp_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 => {
|
id => {
|
||||||
tracing::error!(id, "Wayland: failed to bind to registry global");
|
tracing::error!(id, "Wayland: failed to bind to registry global");
|
||||||
|
|||||||
Reference in New Issue
Block a user