diff options
| author | mat <github@matdoes.dev> | 2022-10-23 16:57:28 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-10-23 16:57:28 -0500 |
| commit | c9b1b19ff235975a80191d512392460c0eabfad4 (patch) | |
| tree | f2271c73b01fec675b523fb79da5b1ae83300091 /azalea-client/src | |
| parent | 2eade86cf7a12a6ec64496aedbfc3d3a3bd44e1a (diff) | |
| download | azalea-drasl-c9b1b19ff235975a80191d512392460c0eabfad4.tar.xz | |
Update examples with new cleaner handle/state
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/chat.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<Event>, state: Arc<Mutex<State>>) -> anyhow::Result<()> { + /// # async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> { /// bot.chat("Hello, world!").await.unwrap(); /// # Ok(()) /// # } |
