aboutsummaryrefslogtreecommitdiff
path: root/azalea/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-12-23 13:58:48 +0700
committermat <git@matdoes.dev>2025-12-23 13:58:48 +0700
commit0429a81d706da7c45600d357f9f9a14cef6113b4 (patch)
tree27e2f0607f1d8a88ceaddb96da0fe3f99394cd9f /azalea/src
parent83f720d9becd70f3c2333772f040b6092785a60e (diff)
downloadazalea-drasl-0429a81d706da7c45600d357f9f9a14cef6113b4.tar.xz
fix broken doctest
Diffstat (limited to 'azalea/src')
-rw-r--r--azalea/src/container.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/azalea/src/container.rs b/azalea/src/container.rs
index d12fb380..3ae45e28 100644
--- a/azalea/src/container.rs
+++ b/azalea/src/container.rs
@@ -273,10 +273,13 @@ impl ContainerHandleRef {
/// Returns the title of the container, or `None` if no container is open.
///
/// ```no_run
+ /// # use azalea::prelude::*;
+ /// # fn example(bot: &azalea::Client) {
/// let inventory = bot.get_inventory();
- /// let inventory_title = inventory.title.unwrap_or_default().to_string();
+ /// let inventory_title = inventory.title().unwrap_or_default().to_string();
/// // would be true if an unnamed chest is open
/// assert_eq!(inventory_title, "Chest");
+ /// # }
/// ```
pub fn title(&self) -> Option<FormattedText> {
self.map_inventory(|inv| inv.container_menu_title.clone())