diff --git a/src/commands/brainfuck.rs b/src/commands/brainfuck.rs index dc3b442..fc45723 100644 --- a/src/commands/brainfuck.rs +++ b/src/commands/brainfuck.rs @@ -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); diff --git a/src/commands/lyrics.rs b/src/commands/lyrics.rs index 9a4eb48..f35714f 100644 --- a/src/commands/lyrics.rs +++ b/src/commands/lyrics.rs @@ -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)); diff --git a/src/main.rs b/src/main.rs index ed939a1..6ab2ef1 100755 --- a/src/main.rs +++ b/src/main.rs @@ -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")