forked from sorceress/rustcord
Make clippy happy
This commit is contained in:
parent
42ff74e0be
commit
b2e169fb0b
|
@ -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);
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue