diff options
| author | mat <git@matdoes.dev> | 2026-05-06 18:38:23 -0545 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-05-07 08:05:58 -1200 |
| commit | cabc8b60a729ba17f5b75f7a7956c6d1ddcc8919 (patch) | |
| tree | 237fd12a9768fe7431ce42dfbdde60f4c7850e06 /azalea/src/_docs | |
| parent | 9ffd0e80bbb3feace231553d6539124585b03e3c (diff) | |
| download | azalea-drasl-cabc8b60a729ba17f5b75f7a7956c6d1ddcc8919.tar.xz | |
azalea-brigadier now allows commands to return a Result
Diffstat (limited to 'azalea/src/_docs')
| -rw-r--r-- | azalea/src/_docs/performance.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea/src/_docs/performance.md b/azalea/src/_docs/performance.md index bf580f73..d7d2f596 100644 --- a/azalea/src/_docs/performance.md +++ b/azalea/src/_docs/performance.md @@ -91,14 +91,15 @@ If the client doesn't need a high view distance, then you can reduce the number This can be done by having something like the following in your handler function: ```rust,no_run # use azalea::ClientInformation; -# async fn handle(bot: azalea::Client, event: azalea::Event, state: azalea::NoState) { +# async fn handle(bot: azalea::Client, event: azalea::Event, state: azalea::NoState) -> azalea::error::AzaleaResult<()> { # match event { azalea::Event::Init => bot.set_client_information(ClientInformation { view_distance: 2, ..Default::default() -}), +})?, # _ => {} # } +# Ok(()) # } ``` |
