Massive lint fix

This commit is contained in:
Natsu Kagami 2023-10-22 17:45:13 +02:00
parent 1a6039aa94
commit 54502ad61b
Signed by: nki
GPG key ID: 55A032EB38B49ADB
28 changed files with 117 additions and 122 deletions

View file

@ -103,7 +103,7 @@ async fn get_image(
// Fix the tags: change whitespaces to +
let tags = tags.split_whitespace().collect::<Vec<_>>().join("_");
let req = client
.get(&format!(
.get(format!(
"https://danbooru.donmai.us/posts.json?tags=rating:{}+{}",
rating.to_string(),
tags

View file

@ -95,7 +95,7 @@ async fn pick(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
.peekable();
// If we have the first argument as question, use it.
let question = match choices.peek() {
Some(ref q) if q.starts_with('?') => Some(q.replacen("?", "", 1) + "?"),
Some(q) if q.starts_with('?') => Some(q.replacen('?', "", 1) + "?"),
_ => None,
};
// If we have a question, that's not a choice.