aboutsummaryrefslogtreecommitdiffstats
path: root/src/bot/music.rs
diff options
context:
space:
mode:
authorJokler <jokler@protonmail.com>2020-08-19 03:38:48 +0200
committerJokler <jokler@protonmail.com>2020-08-19 03:38:48 +0200
commit237e0c4fb48d9694c263f703a42f7790a99368ef (patch)
treecd7f8351d92a2cd58c3eff08164a2eb7070d65f3 /src/bot/music.rs
parent681950517d511d1c4b8e465f9b9758c027ecd6bf (diff)
downloadpokebot-237e0c4fb48d9694c263f703a42f7790a99368ef.tar.gz
pokebot-237e0c4fb48d9694c263f703a42f7790a99368ef.zip
Run clippy and fmt
Diffstat (limited to 'src/bot/music.rs')
-rw-r--r--src/bot/music.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bot/music.rs b/src/bot/music.rs
index 14a73f9..71e7b58 100644
--- a/src/bot/music.rs
+++ b/src/bot/music.rs
@@ -4,7 +4,6 @@ use std::sync::{Arc, RwLock};
use std::thread;
use std::time::Duration;
-use humantime;
use log::{debug, info};
use serde::Serialize;
use structopt::StructOpt;
@@ -56,7 +55,7 @@ pub enum MusicBotMessage {
ChannelCreated(ChannelId),
ClientDisconnected {
id: ClientId,
- client: data::Client,
+ client: Box<data::Client>,
},
StateChange(State),
Quit(String),
@@ -284,7 +283,7 @@ impl MusicBot {
async fn on_text(&self, message: Message) -> Result<(), AudioPlayerError> {
let msg = message.text;
- if msg.starts_with("!") {
+ if msg.starts_with('!') {
let tokens = msg[1..].split_whitespace().collect::<Vec<_>>();
match Command::from_iter_safe(&tokens) {