From c9b1b19ff235975a80191d512392460c0eabfad4 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 23 Oct 2022 16:57:28 -0500 Subject: Update examples with new cleaner handle/state --- azalea-client/src/chat.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'azalea-client/src') diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index fecd76ae..335261e6 100644 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -69,15 +69,16 @@ impl Client { /// # azalea::start(azalea::Options { /// # account, /// # address: "localhost", - /// # state: Arc::new(Mutex::new(State::default())), + /// # state: State::default(), /// # plugins: vec![], /// # handle, /// # }) /// # .await /// # .unwrap(); /// # } + /// # #[derive(Default, Clone)] /// # pub struct State {} - /// # async fn handle(bot: Client, event: Arc, state: Arc>) -> anyhow::Result<()> { + /// # async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> { /// bot.chat("Hello, world!").await.unwrap(); /// # Ok(()) /// # } -- cgit v1.2.3