chore: cargo fmt

This commit is contained in:
Nova
2025-09-04 15:37:12 -07:00
parent c665f33d25
commit 51b0942c49
4 changed files with 50 additions and 56 deletions

View File

@@ -227,7 +227,7 @@ fn build_line_mesh(
perceptual_roughness: 1.0, perceptual_roughness: 1.0,
// TODO: this should be Blend // TODO: this should be Blend
alpha_mode: AlphaMode::Opaque, alpha_mode: AlphaMode::Opaque,
emissive: Color::srgba_u8(128/4, 128/4, 128/4, 255).into(), emissive: Color::srgba_u8(128 / 4, 128 / 4, 128 / 4, 255).into(),
..default() ..default()
}, },
extension: LineExtension { unused: 0 }, extension: LineExtension { unused: 0 },

View File

@@ -87,13 +87,7 @@ fn despawn_unneeded_spatial_nodes(query: Query<(Entity, &SpatialNode)>, cmds: Pa
}); });
} }
fn update_spatial_nodes( fn update_spatial_nodes(mut query: Query<(&mut BevyTransform, &SpatialNode, &mut Visibility)>) {
mut query: Query<(
&mut BevyTransform,
&SpatialNode,
&mut Visibility,
)>,
) {
query query
.par_iter_mut() .par_iter_mut()
.for_each(|(mut transform, spatial_node, mut vis)| { .for_each(|(mut transform, spatial_node, mut vis)| {

View File

@@ -5,8 +5,8 @@ mod mesa_drm;
mod presentation; mod presentation;
mod registry; mod registry;
mod util; mod util;
mod vulkano_data;
mod viewporter; mod viewporter;
mod vulkano_data;
mod xdg; mod xdg;
use crate::core::registry::OwnedRegistry; use crate::core::registry::OwnedRegistry;

View File

@@ -1,6 +1,6 @@
use waynest::{ use waynest::{
server::{Client, Dispatcher, Result}, server::{Client, Dispatcher, Result},
wire::{ObjectId, Fixed}, wire::{Fixed, ObjectId},
}; };
pub use waynest::server::protocol::stable::viewporter::wp_viewport::*; pub use waynest::server::protocol::stable::viewporter::wp_viewport::*;
@@ -12,59 +12,59 @@ pub use waynest::server::protocol::stable::viewporter::wp_viewporter::*;
pub struct Viewporter; pub struct Viewporter;
impl WpViewporter for Viewporter { impl WpViewporter for Viewporter {
async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> { async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
Ok(()) Ok(())
} }
async fn get_viewport( async fn get_viewport(
&self, &self,
client: &mut Client, client: &mut Client,
_sender_id: ObjectId, _sender_id: ObjectId,
id: ObjectId, id: ObjectId,
surface_id: ObjectId, surface_id: ObjectId,
) -> Result<()> { ) -> Result<()> {
let viewport = Viewport::new(id, surface_id); let viewport = Viewport::new(id, surface_id);
client.insert(id, viewport); client.insert(id, viewport);
Ok(()) Ok(())
} }
} }
#[derive(Debug, Dispatcher)] #[derive(Debug, Dispatcher)]
pub struct Viewport { pub struct Viewport {
id: ObjectId, id: ObjectId,
surface_id: ObjectId, surface_id: ObjectId,
} }
impl Viewport { impl Viewport {
pub fn new(id: ObjectId, surface_id: ObjectId) -> Self { pub fn new(id: ObjectId, surface_id: ObjectId) -> Self {
Self { id, surface_id } Self { id, surface_id }
} }
} }
impl WpViewport for Viewport { impl WpViewport for Viewport {
async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> { async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> {
Ok(()) Ok(())
} }
async fn set_source( async fn set_source(
&self, &self,
_client: &mut Client, _client: &mut Client,
_sender_id: ObjectId, _sender_id: ObjectId,
_x: Fixed, _x: Fixed,
_y: Fixed, _y: Fixed,
_width: Fixed, _width: Fixed,
_height: Fixed, _height: Fixed,
) -> Result<()> { ) -> Result<()> {
Ok(()) Ok(())
} }
async fn set_destination( async fn set_destination(
&self, &self,
_client: &mut Client, _client: &mut Client,
_sender_id: ObjectId, _sender_id: ObjectId,
_width: i32, _width: i32,
_height: i32, _height: i32,
) -> Result<()> { ) -> Result<()> {
Ok(()) Ok(())
} }
} }