mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 23:44:38 +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-protocol",
|
||||||
"azalea-world",
|
"azalea-world",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
|
"log",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"priority-queue",
|
"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-physics = { version = "0.3.0", path = "../azalea-physics" }
|
||||||
azalea-protocol = {version = "0.3.0", path = "../azalea-protocol"}
|
azalea-protocol = {version = "0.3.0", path = "../azalea-protocol"}
|
||||||
azalea-world = { version = "0.3.0", path = "../azalea-world" }
|
azalea-world = { version = "0.3.0", path = "../azalea-world" }
|
||||||
|
log = "0.4.17"
|
||||||
num-traits = "0.2.15"
|
num-traits = "0.2.15"
|
||||||
parking_lot = {version = "^0.12.1", features = ["deadlock_detection"]}
|
parking_lot = {version = "^0.12.1", features = ["deadlock_detection"]}
|
||||||
priority-queue = "1.3.0"
|
priority-queue = "1.3.0"
|
||||||
|
|
|
@ -6,6 +6,7 @@ use crate::{Client, Event};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use azalea_core::{BlockPos, CardinalDirection};
|
use azalea_core::{BlockPos, CardinalDirection};
|
||||||
use azalea_world::entity::EntityData;
|
use azalea_world::entity::EntityData;
|
||||||
|
use log::debug;
|
||||||
use mtdstarlite::Edge;
|
use mtdstarlite::Edge;
|
||||||
pub use mtdstarlite::MTDStarLite;
|
pub use mtdstarlite::MTDStarLite;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
@ -47,7 +48,7 @@ impl Trait for azalea_client::Client {
|
||||||
vertical_vel: VerticalVel::None,
|
vertical_vel: VerticalVel::None,
|
||||||
};
|
};
|
||||||
let end = goal.goal_node();
|
let end = goal.goal_node();
|
||||||
println!("start: {:?}, end: {:?}", start, end);
|
debug!("start: {start:?}, end: {end:?}");
|
||||||
|
|
||||||
let possible_moves: Vec<&dyn moves::Move> = vec![
|
let possible_moves: Vec<&dyn moves::Move> = vec![
|
||||||
&moves::ForwardMove(CardinalDirection::North),
|
&moves::ForwardMove(CardinalDirection::North),
|
||||||
|
@ -96,8 +97,8 @@ impl Trait for azalea_client::Client {
|
||||||
let start = std::time::Instant::now();
|
let start = std::time::Instant::now();
|
||||||
let p = pf.find_path();
|
let p = pf.find_path();
|
||||||
let end = std::time::Instant::now();
|
let end = std::time::Instant::now();
|
||||||
println!("path: {:?}", p);
|
debug!("path: {p:?}");
|
||||||
println!("time: {:?}", end - start);
|
debug!("time: {:?}", end - start);
|
||||||
|
|
||||||
let state = self
|
let state = self
|
||||||
.plugins
|
.plugins
|
||||||
|
|
|
@ -25,7 +25,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
|
|
||||||
println!("{} deadlocks detected", deadlocks.len());
|
println!("{} deadlocks detected", deadlocks.len());
|
||||||
for (i, threads) in deadlocks.iter().enumerate() {
|
for (i, threads) in deadlocks.iter().enumerate() {
|
||||||
println!("Deadlock #{}", i);
|
println!("Deadlock #{i}");
|
||||||
for t in threads {
|
for t in threads {
|
||||||
println!("Thread Id {:#?}", t.thread_id());
|
println!("Thread Id {:#?}", t.thread_id());
|
||||||
println!("{:#?}", t.backtrace());
|
println!("{:#?}", t.backtrace());
|
||||||
|
@ -46,7 +46,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
handle,
|
handle,
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
println!("{:?}", e);
|
println!("{e:?}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue