diff options
| author | Nathan Perry <np@nathanperry.dev> | 2019-11-17 23:51:56 -0500 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2019-11-17 23:51:56 -0500 |
| commit | 8a5a841e619793ce81b177179694712284be23e4 (patch) | |
| tree | 6e8b46b1a008a94236e5aaaf48fad95dee70451a /src/commands/roll.rs | |
| parent | c068e82d2b6341cf7896bfc2e1fd4683f28d67b4 (diff) | |
borrowck fixes
Diffstat (limited to 'src/commands/roll.rs')
| -rw-r--r-- | src/commands/roll.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/roll.rs b/src/commands/roll.rs index 1588d10..5f5ff6d 100644 --- a/src/commands/roll.rs +++ b/src/commands/roll.rs @@ -8,7 +8,6 @@ use rand::prelude::*; use serenity::{ framework::standard::{ Args, - CommandResult, macros::command, }, model::channel::Message, @@ -20,6 +19,7 @@ use thiserror::Error; use lazy_static::lazy_static; use crate::{ + Result, util::CtxExt, }; @@ -208,7 +208,7 @@ mod test { #[command] #[aliases("calc", "calculate")] -pub fn roll(ctx: &mut Context, msg: &Message, args: Args) -> CommandResult { +pub fn roll(ctx: &mut Context, msg: &Message, args: Args) -> Result<()> { match Calc::eval(args.rest()) { Ok(result) => { debug!("got calc result '{}'", result); |
