Make clippy happy

This commit is contained in:
Agatha Lovelace 2020-07-27 20:03:41 +03:00
parent bda1a9dc54
commit 48074cd200
3 changed files with 5 additions and 4 deletions

View File

@ -14,7 +14,7 @@ fn brainfuck(ctx: &mut Context, message: &Message, args: Args) -> CommandResult
"" => {
return Err(CommandError(s!("Called without input!")));
}
v @ _ => v,
v => v,
};
let output = Brainfuck::execute(input);

View File

@ -27,7 +27,7 @@ fn lyrics(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
"" => {
return Err(CommandError(s!("Called without input!")));
}
v @ _ => v,
v => v,
};
// encode into url
url += &s!(percent_encode(input.as_bytes(), NON_ALPHANUMERIC));

View File

@ -1,4 +1,5 @@
#![allow(clippy::unreadable_literal)]
#![allow(clippy::cmp_owned)]
#[macro_use]
extern crate lazy_static;
@ -479,7 +480,7 @@ fn owo(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
Err(_) => return Err(CommandError(s!("Could not get last message!"))),
};
let ref lastmsg = lastmsg[0].content;
let lastmsg = &lastmsg[0].content;
let input: String = match args.is_empty() {
true => s!(lastmsg),
@ -508,7 +509,7 @@ fn desc(ctx: &mut Context, message: &Message) -> CommandResult {
};
let channel = channel_lock.read();
let topic = if channel.topic.clone().unwrap() != String::from("") {
let topic = if channel.topic.clone().unwrap() != "" {
channel.topic.clone().unwrap()
} else {
String::from("No channel topic found")