diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-11 21:00:37 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-11 21:00:37 -0600 |
| commit | ff1e28f88e93ba83cf76569b5613445b841efd45 (patch) | |
| tree | 2dc6a20bbd0fa3d038fe0e655d1cf96f0e3bb838 /azalea/examples | |
| parent | 9bfb1705afb8a48ceace712bc4ee8c0b4d507f49 (diff) | |
| download | azalea-drasl-ff1e28f88e93ba83cf76569b5613445b841efd45.tar.xz | |
Run handler function in a Tokio LocalSet (#295)
* Run handler function in a Tokio LocalSet
* remove tokio flavor=current_thread from examples
* update changelog
Diffstat (limited to 'azalea/examples')
| -rw-r--r-- | azalea/examples/echo.rs | 2 | ||||
| -rw-r--r-- | azalea/examples/nearest_entity.rs | 2 | ||||
| -rw-r--r-- | azalea/examples/steal.rs | 2 | ||||
| -rw-r--r-- | azalea/examples/testbot/main.rs | 2 | ||||
| -rw-r--r-- | azalea/examples/todo/craft_dig_straight_down.rs | 2 | ||||
| -rw-r--r-- | azalea/examples/todo/mine_a_chunk.rs | 2 | ||||
| -rw-r--r-- | azalea/examples/todo/pvp.rs | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/azalea/examples/echo.rs b/azalea/examples/echo.rs index 0f59be2a..a2219008 100644 --- a/azalea/examples/echo.rs +++ b/azalea/examples/echo.rs @@ -2,7 +2,7 @@ use azalea::prelude::*; -#[tokio::main(flavor = "current_thread")] +#[tokio::main] async fn main() { let account = Account::offline("bot"); // or let account = Account::microsoft("email").await.unwrap(); diff --git a/azalea/examples/nearest_entity.rs b/azalea/examples/nearest_entity.rs index 51aa26f6..19223589 100644 --- a/azalea/examples/nearest_entity.rs +++ b/azalea/examples/nearest_entity.rs @@ -17,7 +17,7 @@ use bevy_ecs::{ system::Query, }; -#[tokio::main(flavor = "current_thread")] +#[tokio::main] async fn main() { let account = Account::offline("bot"); diff --git a/azalea/examples/steal.rs b/azalea/examples/steal.rs index 87a1561b..899c2568 100644 --- a/azalea/examples/steal.rs +++ b/azalea/examples/steal.rs @@ -6,7 +6,7 @@ use azalea::{BlockPos, pathfinder::goals::RadiusGoal, prelude::*}; use azalea_inventory::{ItemStack, operations::QuickMoveClick}; use parking_lot::Mutex; -#[tokio::main(flavor = "current_thread")] +#[tokio::main] async fn main() { let account = Account::offline("bot"); // or let bot = Account::microsoft("email").await.unwrap(); diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs index b4ef20ba..6adb782c 100644 --- a/azalea/examples/testbot/main.rs +++ b/azalea/examples/testbot/main.rs @@ -32,7 +32,7 @@ use azalea::{ use commands::{CommandSource, register_commands}; use parking_lot::Mutex; -#[tokio::main(flavor = "current_thread")] +#[tokio::main] async fn main() { let args = parse_args(); diff --git a/azalea/examples/todo/craft_dig_straight_down.rs b/azalea/examples/todo/craft_dig_straight_down.rs index bf312331..951c3de2 100644 --- a/azalea/examples/todo/craft_dig_straight_down.rs +++ b/azalea/examples/todo/craft_dig_straight_down.rs @@ -8,7 +8,7 @@ struct State { pub started: Arc<Mutex<bool>>, } -#[tokio::main(flavor = "current_thread")] +#[tokio::main] 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 eb7fafd4..0c439f26 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(flavor = "current_thread")] +#[tokio::main] 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 0639d86b..d85278e8 100644 --- a/azalea/examples/todo/pvp.rs +++ b/azalea/examples/todo/pvp.rs @@ -5,7 +5,7 @@ use azalea::{ pathfinder, prelude::*, swarm::prelude::*, }; -#[tokio::main(flavor = "current_thread")] +#[tokio::main] async fn main() { let mut accounts = Vec::new(); let mut states = Vec::new(); |
