fix: doc tests

This commit is contained in:
Alexander Medvedev committed 2026-08-27 13:30:00 +02:00
1 parent 800f7d70e5
commit 8d2a9d0979
1 file changed
+1 -3
@@ -141,15 +141,13 @@ impl CommandContext<'_> {
/// ///
/// struct Executor; /// struct Executor;
/// impl CommandExecutor for Executor { /// impl CommandExecutor for Executor {
/// fn execute<'a>(&'a self, context: &'a CommandContext) -> CommandExecutorResult<'a> { /// fn execute(&self, context: &CommandContext) -> CommandExecutorResult {
/// Box::pin(async move {
/// // The `get_argument` method returns a `Result<&i32, CommandSyntaxError>`. /// // The `get_argument` method returns a `Result<&i32, CommandSyntaxError>`.
/// // We apply the `?` operator first, propagating the `CommandSyntaxError` if contained. /// // We apply the `?` operator first, propagating the `CommandSyntaxError` if contained.
/// // Finally, we dereference the `&i32`, as `i32` implements Copy. /// // Finally, we dereference the `&i32`, as `i32` implements Copy.
/// let operand1: i32 = *context.get_argument("operand1")?; /// let operand1: i32 = *context.get_argument("operand1")?;
/// let operand2: i32 = *context.get_argument("operand2")?; /// let operand2: i32 = *context.get_argument("operand2")?;
/// Ok(operand1 + operand2) /// Ok(operand1 + operand2)
/// })
/// } /// }
/// } /// }
/// ``` /// ```