From cd9ebb6739561d5e9953d9cf7d007b496dfe6e8a Mon Sep 17 00:00:00 2001 From: "Victor A." <52110451+cs50victor@users.noreply.github.com> Date: Tue, 23 Jan 2024 14:50:07 -0500 Subject: [PATCH] chore: lint --- new_media/src/frame_capture.rs | 6 +++--- new_media/src/main.rs | 2 +- new_media/src/server.rs | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/new_media/src/frame_capture.rs b/new_media/src/frame_capture.rs index 7a8241c..71b778f 100644 --- a/new_media/src/frame_capture.rs +++ b/new_media/src/frame_capture.rs @@ -191,7 +191,7 @@ pub mod scene { render::{camera::RenderTarget, renderer::RenderDevice}, }; - use image::{DynamicImage, ImageBuffer, ImageOutputFormat, Rgba, RgbaImage}; + use image::{ImageBuffer, ImageOutputFormat, Rgba, RgbaImage}; use wgpu::{Extent3d, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages}; use super::image_copy::ImageCopier; @@ -340,7 +340,7 @@ pub mod scene { } } - fn image_to_browser_base64(img: &ImageBuffer, Vec>)-> Result { + fn image_to_browser_base64(img: &ImageBuffer, Vec>) -> Result { let mut image_data: Vec = Vec::new(); img.write_to(&mut Cursor::new(&mut image_data), ImageOutputFormat::Png)?; let res_base64 = general_purpose::STANDARD.encode(image_data); @@ -348,7 +348,7 @@ pub mod scene { } pub fn white_img_placeholder(w: u32, h: u32) -> String { - let mut img = RgbaImage::new(w,h); + let img = RgbaImage::new(w, h); // img.iter_mut().for_each(|pixel| *pixel = 255); image_to_browser_base64(&img).unwrap() } diff --git a/new_media/src/main.rs b/new_media/src/main.rs index 0339b3a..388b33d 100644 --- a/new_media/src/main.rs +++ b/new_media/src/main.rs @@ -40,7 +40,7 @@ pub struct AudioSync { fn setup_gaussian_cloud( mut commands: Commands, - asset_server: Res, + _asset_server: Res, mut gaussian_assets: ResMut>, mut scene_controller: ResMut, mut images: ResMut>, diff --git a/new_media/src/server.rs b/new_media/src/server.rs index c65522a..e29a302 100644 --- a/new_media/src/server.rs +++ b/new_media/src/server.rs @@ -61,7 +61,11 @@ pub fn start_ws(listener: Res) { }; } -pub fn receive_message(mut commands: Commands, curr_base64_img: Res, connections: Query<(Entity, &WsConnection)>) { +pub fn receive_message( + mut commands: Commands, + curr_base64_img: Res, + connections: Query<(Entity, &WsConnection)>, +) { for (entity, conn) in connections.iter() { loop { match conn.receive() { @@ -84,4 +88,3 @@ pub fn receive_message(mut commands: Commands, curr_base64_img: Res