mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
clippy + replace some printlns with debug
This commit is contained in:
parent
7ad4b22726
commit
6c6eb5572b
4 changed files with 8 additions and 5 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -120,6 +120,7 @@ dependencies = [
|
|||
"azalea-protocol",
|
||||
"azalea-world",
|
||||
"env_logger",
|
||||
"log",
|
||||
"num-traits",
|
||||
"parking_lot",
|
||||
"priority-queue",
|
||||
|
|
|
@ -17,6 +17,7 @@ azalea-core = {version = "0.3.0", path = "../azalea-core"}
|
|||
azalea-physics = { version = "0.3.0", path = "../azalea-physics" }
|
||||
azalea-protocol = {version = "0.3.0", path = "../azalea-protocol"}
|
||||
azalea-world = { version = "0.3.0", path = "../azalea-world" }
|
||||
log = "0.4.17"
|
||||
num-traits = "0.2.15"
|
||||
parking_lot = {version = "^0.12.1", features = ["deadlock_detection"]}
|
||||
priority-queue = "1.3.0"
|
||||
|
|
|
@ -6,6 +6,7 @@ use crate::{Client, Event};
|
|||
use async_trait::async_trait;
|
||||
use azalea_core::{BlockPos, CardinalDirection};
|
||||
use azalea_world::entity::EntityData;
|
||||
use log::debug;
|
||||
use mtdstarlite::Edge;
|
||||
pub use mtdstarlite::MTDStarLite;
|
||||
use parking_lot::Mutex;
|
||||
|
@ -47,7 +48,7 @@ impl Trait for azalea_client::Client {
|
|||
vertical_vel: VerticalVel::None,
|
||||
};
|
||||
let end = goal.goal_node();
|
||||
println!("start: {:?}, end: {:?}", start, end);
|
||||
debug!("start: {start:?}, end: {end:?}");
|
||||
|
||||
let possible_moves: Vec<&dyn moves::Move> = vec![
|
||||
&moves::ForwardMove(CardinalDirection::North),
|
||||
|
@ -96,8 +97,8 @@ impl Trait for azalea_client::Client {
|
|||
let start = std::time::Instant::now();
|
||||
let p = pf.find_path();
|
||||
let end = std::time::Instant::now();
|
||||
println!("path: {:?}", p);
|
||||
println!("time: {:?}", end - start);
|
||||
debug!("path: {p:?}");
|
||||
debug!("time: {:?}", end - start);
|
||||
|
||||
let state = self
|
||||
.plugins
|
||||
|
|
|
@ -25,7 +25,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
println!("{} deadlocks detected", deadlocks.len());
|
||||
for (i, threads) in deadlocks.iter().enumerate() {
|
||||
println!("Deadlock #{}", i);
|
||||
println!("Deadlock #{i}");
|
||||
for t in threads {
|
||||
println!("Thread Id {:#?}", t.thread_id());
|
||||
println!("{:#?}", t.backtrace());
|
||||
|
@ -46,7 +46,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
handle,
|
||||
})
|
||||
.await;
|
||||
println!("{:?}", e);
|
||||
println!("{e:?}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue