aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/swarm
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-03-18 16:28:46 -1030
committermat <git@matdoes.dev>2026-03-20 04:21:58 -0200
commit25cd1c0b60604655b70d70f8ec33a54853905eea (patch)
tree28911045f6d69b2fffcb8d9c5a92fe32657b5e4b /azalea/src/swarm
parentb03d2942e1bef98e13acadde5cbb8856a3f8c74d (diff)
downloadazalea-drasl-25cd1c0b60604655b70d70f8ec33a54853905eea.tar.xz
optimize pathfinder swarms and write perf guide
Diffstat (limited to 'azalea/src/swarm')
-rw-r--r--azalea/src/swarm/builder.rs12
-rw-r--r--azalea/src/swarm/mod.rs4
2 files changed, 8 insertions, 8 deletions
diff --git a/azalea/src/swarm/builder.rs b/azalea/src/swarm/builder.rs
index 853324fa..42654206 100644
--- a/azalea/src/swarm/builder.rs
+++ b/azalea/src/swarm/builder.rs
@@ -105,10 +105,10 @@ impl SwarmBuilder<NoState, NoSwarmState, (), ()> {
/// # swarm_builder.set_handler(handle).set_swarm_handler(swarm_handle);
/// # #[derive(Clone, Component, Default, Resource)]
/// # pub struct State;
- /// # async fn handle(mut bot: Client, event: Event, state: State) -> anyhow::Result<()> {
+ /// # async fn handle(mut bot: Client, event: Event, state: State) -> eyre::Result<()> {
/// # Ok(())
/// # }
- /// # async fn swarm_handle(swarm: Swarm, event: SwarmEvent, state: State) -> anyhow::Result<()> {
+ /// # async fn swarm_handle(swarm: Swarm, event: SwarmEvent, state: State) -> eyre::Result<()> {
/// # Ok(())
/// # }
/// ```
@@ -157,7 +157,7 @@ where
///
/// #[derive(Clone, Component, Default)]
/// struct State {}
- /// async fn handle(mut bot: Client, event: Event, state: State) -> anyhow::Result<()> {
+ /// async fn handle(mut bot: Client, event: Event, state: State) -> eyre::Result<()> {
/// Ok(())
/// }
///
@@ -167,7 +167,7 @@ where
/// # mut swarm: Swarm,
/// # event: SwarmEvent,
/// # state: SwarmState,
- /// # ) -> anyhow::Result<()> {
+ /// # ) -> eyre::Result<()> {
/// # Ok(())
/// # }
/// ```
@@ -214,7 +214,7 @@ where
/// # #[derive(Clone, Component, Default)]
/// # struct State {}
///
- /// # async fn handle(mut bot: Client, event: Event, state: State) -> anyhow::Result<()> {
+ /// # async fn handle(mut bot: Client, event: Event, state: State) -> eyre::Result<()> {
/// # Ok(())
/// # }
///
@@ -224,7 +224,7 @@ where
/// mut swarm: Swarm,
/// event: SwarmEvent,
/// state: SwarmState,
- /// ) -> anyhow::Result<()> {
+ /// ) -> eyre::Result<()> {
/// Ok(())
/// }
/// ```
diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs
index de4d2ebe..616733f8 100644
--- a/azalea/src/swarm/mod.rs
+++ b/azalea/src/swarm/mod.rs
@@ -117,7 +117,7 @@ pub type BoxSwarmHandleFn<SS, R> =
/// .await
/// }
///
-/// async fn handle(bot: Client, event: Event, _state: State) -> anyhow::Result<()> {
+/// async fn handle(bot: Client, event: Event, _state: State) -> eyre::Result<()> {
/// match &event {
/// _ => {}
/// }
@@ -128,7 +128,7 @@ pub type BoxSwarmHandleFn<SS, R> =
/// mut swarm: Swarm,
/// event: SwarmEvent,
/// _state: SwarmState,
-/// ) -> anyhow::Result<()> {
+/// ) -> eyre::Result<()> {
/// match &event {
/// SwarmEvent::Chat(m) => {
/// println!("{}", m.message().to_ansi());