From 2f5aaf349cb069e58680548cfce21e871627f741 Mon Sep 17 00:00:00 2001 From: ActuallyHappening <105958073+ActuallyHappening@users.noreply.github.com> Date: Sat, 8 Jul 2023 10:06:30 +1000 Subject: [PATCH] fix --- src/board.rs | 14 +++++++------- src/board/visualization.rs | 6 +++--- src/solver/algs/hamiltonian.rs | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/board.rs b/src/board.rs index de67ed1..676a5a7 100644 --- a/src/board.rs +++ b/src/board.rs @@ -13,7 +13,7 @@ use crate::solver::algs::*; use crate::solver::pieces::StandardKnight; use crate::solver::{pieces::ChessPiece, BoardOptions, ChessPoint}; -use bevy::ecs::event::ManualEventIterator; + use bevy::prelude::*; use bevy_mod_picking::prelude::*; use std::f32::consts::TAU; @@ -299,7 +299,7 @@ mod compute { alg: Algorithm, piece: &P, options: Options, - commands: &mut Commands, + _commands: &mut Commands, ) { let state = options.clone(); if let Some(start) = options.selected_start { @@ -438,7 +438,7 @@ mod cached_info { mut computations: EventReader, mut commands: Commands, - markers: Query, With)>, + _markers: Query, With)>, mut mma: ResSpawning, ) { // if !computations.is_empty() { @@ -474,13 +474,13 @@ mod ui { use strum::IntoEnumIterator; pub fn left_sidebar_ui( - commands: Commands, + _commands: Commands, mut contexts: EguiContexts, mut cam: Query<&mut Transform, With>, mut next_state: ResMut>, state: Res>, - mut current_level: ResMut, + current_level: ResMut, options: ResMut, mut new_board_event: EventWriter, @@ -599,7 +599,7 @@ mod ui { options: Res, computation: Option>, - mut commands: Commands, + _commands: Commands, mut contexts: EguiContexts, ) { let options = &options.current; @@ -643,7 +643,7 @@ mod ui { } if let Some(start) = &options.selected_start { - let alg_selected: &str = options.selected_algorithm.clone().into(); + let alg_selected: &str = options.selected_algorithm.into(); ui.label(format!( "Current info: Starting at {start} with {} algorithm {}", alg_selected, diff --git a/src/board/visualization.rs b/src/board/visualization.rs index 873bd67..fb4c80e 100644 --- a/src/board/visualization.rs +++ b/src/board/visualization.rs @@ -1,8 +1,8 @@ use super::{ - compute::{begin_background_compute, ComputationResult}, + compute::{ComputationResult}, *, }; -use crate::solver::{algs::Computation, pieces::StandardKnight, Move, Moves}; +use crate::solver::{algs::Computation, Move, Moves}; #[derive(Component, Debug, Clone)] pub struct VisualizationComponent { @@ -16,7 +16,7 @@ pub fn handle_spawning_visualization( mut solutions: EventReader, current_options: Res, - viz: Query>, + _viz: Query>, mut mma: ResSpawning, ) { diff --git a/src/solver/algs/hamiltonian.rs b/src/solver/algs/hamiltonian.rs index 81dbecd..fd1e68b 100644 --- a/src/solver/algs/hamiltonian.rs +++ b/src/solver/algs/hamiltonian.rs @@ -2,7 +2,7 @@ use itertools::Itertools; use std::{ collections::{HashMap, HashSet}, }; -use tracing::{debug, info, trace}; +use tracing::{debug, trace}; use crate::{ solver::{pieces::ChessPiece, BoardOptions, Move, Moves},