From 016f6cec6d73c13a2a5ccc704688260cdbc72d17 Mon Sep 17 00:00:00 2001 From: core Date: Fri, 28 Mar 2025 09:15:16 -0400 Subject: [PATCH] cargo fix --- crates/client/src/networking/mod.rs | 2 +- crates/client/src/rendering/mod.rs | 4 ++-- crates/client/src/ui/mod.rs | 2 +- crates/kabel/src/main.rs | 2 +- crates/server/src/crafting/mining.rs | 4 ++-- crates/server/src/player/client_login.rs | 2 +- crates/xtask/src/main.rs | 11 ++++------- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/crates/client/src/networking/mod.rs b/crates/client/src/networking/mod.rs index bae0e12a5130120b6ccbd0d2191e850470921559..45839a7877f9fdea3189c01daa6059fc5285539a 100644 --- a/crates/client/src/networking/mod.rs +++ b/crates/client/src/networking/mod.rs @@ -9,7 +9,7 @@ use bevy_ecs::{ use nalgebra::{Rotation2, Scale3, Translation3}; use starkingdoms_common::{packet::Packet, PartType, PlanetType}; -use crate::components::{Camera, Chat, Menu, Part, Planet, Player, PlayerResources, RecvPacket, SendPacket, ServerId, SpriteBundle, Texture, Transform}; +use crate::components::{Camera, Chat, Menu, Part, Player, PlayerResources, RecvPacket, SendPacket, ServerId, SpriteBundle, Texture, Transform}; #[cfg(target_arch = "wasm32")] #[path = "ws_wasm.rs"] diff --git a/crates/client/src/rendering/mod.rs b/crates/client/src/rendering/mod.rs index 9f08285c3de60fb7ecf57be7db6a1f203e23e911..45bae0ee3034b5fb7fce1ffd8aef763338c741b6 100644 --- a/crates/client/src/rendering/mod.rs +++ b/crates/client/src/rendering/mod.rs @@ -476,7 +476,7 @@ impl ApplicationHandler for App { } } fn about_to_wait(&mut self, event_loop: &ActiveEventLoop) { - let mut ws = self + let ws = self .world .get_resource_mut::() .expect("Failed to get Ws resource"); @@ -500,7 +500,7 @@ impl ApplicationHandler for App { let gl = self.gl.as_ref().unwrap(); - let mut player = self.world.query_filtered::<&Transform, With>(); + let player = self.world.query_filtered::<&Transform, With>(); self.egui_glow .as_mut() diff --git a/crates/client/src/ui/mod.rs b/crates/client/src/ui/mod.rs index 7e7a61ed74ebc8b443d45bc8e90e2e04117cfa45..2dd9a6c7997cfd26e81e1f79fdcc886c5af0f632 100644 --- a/crates/client/src/ui/mod.rs +++ b/crates/client/src/ui/mod.rs @@ -7,7 +7,7 @@ use bevy_ecs::entity::Entity; use bevy_ecs::event::Events; use bevy_ecs::prelude::With; use bevy_ecs::world::World; -use egui::{Align, Align2, CornerRadius, CursorIcon, Layout, Margin, Order, ProgressBar, RichText, Shadow, Stroke, Visuals}; +use egui::{Align, Align2, CursorIcon, Layout, Margin, Order, RichText, Shadow, Visuals}; use starkingdoms_common::packet::Packet; use crate::components::{Camera, Chat, Menu, Player, PlayerResources, SendPacket, Transform}; use crate::ui::widgets::{progress_bar, RichTextExt}; diff --git a/crates/kabel/src/main.rs b/crates/kabel/src/main.rs index 8431d7c4cf6b7f3ebd5e85836d78b0ca848bc165..19c35be556f4a46dc9d03b52ffc13ce785a7576f 100644 --- a/crates/kabel/src/main.rs +++ b/crates/kabel/src/main.rs @@ -2,7 +2,7 @@ use std::{env, fs, process::exit}; -use kabel::{debug::{debug_ast, debug_bytecode, debug_stack, debug_token_array}, run_codegen, run_lexer, run_parser, run_semantic_analysis}; +use kabel::{debug::{debug_ast, debug_bytecode}, run_codegen, run_lexer, run_parser, run_semantic_analysis}; fn main() { let args: Vec = env::args().collect(); diff --git a/crates/server/src/crafting/mining.rs b/crates/server/src/crafting/mining.rs index f757830371d74c7a9ec71a13a4c2933d0faa5e18..d13d5410c8d7390f0bd68a8d16e6ba886ffe750a 100644 --- a/crates/server/src/crafting/mining.rs +++ b/crates/server/src/crafting/mining.rs @@ -1,8 +1,8 @@ -use bevy::prelude::{Children, Entity, Query, Res, With}; +use bevy::prelude::{Children, Entity, Query, Res}; use bevy_rapier2d::plugin::RapierContext; use crate::{module::component::Attach, planet::PlanetType}; -use super::components::{IsMining, MaterialType, VarietyMaterialStorage}; +use super::components::{IsMining, VarietyMaterialStorage}; pub fn mine_materials( rapier_context: Res, planet_query: Query<(&PlanetType, &Children)>, diff --git a/crates/server/src/player/client_login.rs b/crates/server/src/player/client_login.rs index 60597f38b41f152184faf64f2053249c5d43e123..6fb337b91820f415bdbbeff2dac78ae48a5877a1 100644 --- a/crates/server/src/player/client_login.rs +++ b/crates/server/src/player/client_login.rs @@ -6,7 +6,7 @@ use hmac::{Hmac, Mac}; use jwt::VerifyWithKey; use rand::Rng; use sha2::Sha256; -use starkingdoms_common::{packet::{MessageType, Packet, Part, Planet, ProtoPartFlags}, proto_part_flags, proto_transform, unpack_savefile, PartType as c_PartType, PlanetType as c_PlanetType}; +use starkingdoms_common::{packet::{MessageType, Packet, Part, Planet, ProtoPartFlags}, proto_part_flags, proto_transform, unpack_savefile, PartType as c_PartType}; use crate::{ config::StkConfig, crafting::components::{IsMining, VarietyMaterialStorage}, module::{ diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs index 9eec8055269851d03ec3b9cd66f08ae87794a5f1..79e8d86cff815d078bfe5d72069cbd0bc4044055 100644 --- a/crates/xtask/src/main.rs +++ b/crates/xtask/src/main.rs @@ -1,18 +1,15 @@ use std::env::{args, var}; -use std::error::Error; use std::fs; -use std::io::{Cursor, Read}; -use std::net::{SocketAddr, TcpListener, TcpStream}; +use std::io::Cursor; use std::path::{Path, PathBuf}; -use std::process::{Command, exit}; -use std::str::FromStr; +use std::process::exit; use std::sync::mpsc; use std::sync::mpsc::TryRecvError; use std::thread::sleep; use std::time::Duration; use colored::Colorize; use notify::{Event, EventKind, RecursiveMode, Watcher}; -use tiny_http::{Header, HeaderField, Response, Server, StatusCode}; +use tiny_http::{Response, Server, StatusCode}; use wasm_pack::command::build::{BuildOptions, Target}; use wasm_pack::command::run_wasm_pack; use wasm_pack::progressbar::LogLevel; @@ -180,7 +177,7 @@ fn main() { match res { Ok(event) => { if let EventKind::Modify(_) = event.kind { - let mut has_non_generated_update = false; + let has_non_generated_update = false; for path in &event.paths { if !path.to_str().unwrap().contains("client/pkg") && !path.to_str().unwrap().ends_with("~") { needs_rebuild = true;