From 8a5a841e619793ce81b177179694712284be23e4 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Sun, 17 Nov 2019 23:51:56 -0500 Subject: borrowck fixes --- src/commands/roll.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/roll.rs') 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); -- cgit v1.3.1