From 8d2a9d0979be9ce6de5f6a7eb15ee93aa6a2770c Mon Sep 17 00:00:00 2001 From: Alexander Medvedev Date: Thu, 27 Aug 2026 13:30:00 +0200 Subject: [PATCH] fix: doc tests --- .../src/command/context/command_context.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/crates/pumpkin/src/command/context/command_context.rs b/crates/pumpkin/src/command/context/command_context.rs index 29521c58b..2b5a95fa7 100644 --- a/crates/pumpkin/src/command/context/command_context.rs +++ b/crates/pumpkin/src/command/context/command_context.rs @@ -141,15 +141,13 @@ impl CommandContext<'_> { /// /// struct Executor; /// impl CommandExecutor for Executor { - /// fn execute<'a>(&'a self, context: &'a CommandContext) -> CommandExecutorResult<'a> { - /// Box::pin(async move { - /// // The `get_argument` method returns a `Result<&i32, CommandSyntaxError>`. - /// // We apply the `?` operator first, propagating the `CommandSyntaxError` if contained. - /// // Finally, we dereference the `&i32`, as `i32` implements Copy. - /// let operand1: i32 = *context.get_argument("operand1")?; - /// let operand2: i32 = *context.get_argument("operand2")?; - /// Ok(operand1 + operand2) - /// }) + /// fn execute(&self, context: &CommandContext) -> CommandExecutorResult { + /// // The `get_argument` method returns a `Result<&i32, CommandSyntaxError>`. + /// // We apply the `?` operator first, propagating the `CommandSyntaxError` if contained. + /// // Finally, we dereference the `&i32`, as `i32` implements Copy. + /// let operand1: i32 = *context.get_argument("operand1")?; + /// let operand2: i32 = *context.get_argument("operand2")?; + /// Ok(operand1 + operand2) /// } /// } /// ```