aboutsummaryrefslogtreecommitdiff
path: root/azalea/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-12-04 20:23:41 -0600
committermat <git@matdoes.dev>2023-12-04 20:23:41 -0600
commitda4afa8ae3afec4cd59b9a19ae1e04818f1763a7 (patch)
tree15ca61301d19808571ddf7412c732308a17391b1 /azalea/src
parent797dd9171088cd697b3c95663cbbc65b05315414 (diff)
downloadazalea-drasl-da4afa8ae3afec4cd59b9a19ae1e04818f1763a7.tar.xz
simplify boilerplate in examples
Diffstat (limited to 'azalea/src')
-rw-r--r--azalea/src/swarm/mod.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs
index 5c7a04be..8eb900a1 100644
--- a/azalea/src/swarm/mod.rs
+++ b/azalea/src/swarm/mod.rs
@@ -470,16 +470,14 @@ pub type BoxSwarmHandleFn<SS> =
/// states.push(State::default());
/// }
///
-/// loop {
-/// let e = SwarmBuilder::new()
-/// .add_accounts(accounts.clone())
-/// .set_handler(handle)
-/// .set_swarm_handler(swarm_handle)
-/// .join_delay(Duration::from_millis(1000))
-/// .start("localhost")
-/// .await;
-/// println!("{e:?}");
-/// }
+/// SwarmBuilder::new()
+/// .add_accounts(accounts.clone())
+/// .set_handler(handle)
+/// .set_swarm_handler(swarm_handle)
+/// .join_delay(Duration::from_millis(1000))
+/// .start("localhost")
+/// .await
+/// .unwrap();
/// }
///
/// async fn handle(bot: Client, event: Event, _state: State) -> anyhow::Result<()> {