From 5e81d85d7e8eeca1b6c86ea028353d7c55361961 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 14 Jun 2025 20:33:22 -1030 Subject: add note about current_thread to azalea readme --- azalea/examples/todo/craft_dig_straight_down.rs | 5 ++--- azalea/examples/todo/mine_a_chunk.rs | 2 +- azalea/examples/todo/pvp.rs | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'azalea/examples/todo') diff --git a/azalea/examples/todo/craft_dig_straight_down.rs b/azalea/examples/todo/craft_dig_straight_down.rs index 0dc8e16d..bf312331 100644 --- a/azalea/examples/todo/craft_dig_straight_down.rs +++ b/azalea/examples/todo/craft_dig_straight_down.rs @@ -1,7 +1,6 @@ use std::sync::Arc; -use azalea::pathfinder; -use azalea::prelude::*; +use azalea::{pathfinder, prelude::*}; use parking_lot::Mutex; #[derive(Default, Clone, Component)] @@ -9,7 +8,7 @@ struct State { pub started: Arc>, } -#[tokio::main] +#[tokio::main(flavor = "current_thread")] async fn main() { let account = Account::offline("bot"); // or let bot = Account::microsoft("email").await; diff --git a/azalea/examples/todo/mine_a_chunk.rs b/azalea/examples/todo/mine_a_chunk.rs index 0c439f26..eb7fafd4 100644 --- a/azalea/examples/todo/mine_a_chunk.rs +++ b/azalea/examples/todo/mine_a_chunk.rs @@ -1,6 +1,6 @@ use azalea::{prelude::*, swarm::prelude::*}; -#[tokio::main] +#[tokio::main(flavor = "current_thread")] async fn main() { let mut accounts = Vec::new(); let mut states = Vec::new(); diff --git a/azalea/examples/todo/pvp.rs b/azalea/examples/todo/pvp.rs index fb5a768d..0639d86b 100644 --- a/azalea/examples/todo/pvp.rs +++ b/azalea/examples/todo/pvp.rs @@ -1,11 +1,11 @@ use std::time::Duration; -use azalea::ecs::query::With; -use azalea::entity::metadata::Player; -use azalea::{pathfinder, Account, Client, Event, GameProfileComponent}; -use azalea::{prelude::*, swarm::prelude::*}; +use azalea::{ + Account, Client, Event, GameProfileComponent, ecs::query::With, entity::metadata::Player, + pathfinder, prelude::*, swarm::prelude::*, +}; -#[tokio::main] +#[tokio::main(flavor = "current_thread")] async fn main() { let mut accounts = Vec::new(); let mut states = Vec::new(); -- cgit v1.2.3