refactor: harden clippy lints

This commit is contained in:
seth 2024-01-27 23:18:35 -05:00
parent 2b3d81cfa4
commit a4abdd72e4
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
19 changed files with 39 additions and 37 deletions

View file

@ -1,7 +1,7 @@
use std::str::FromStr;
use color_eyre::eyre::{eyre, Context as _, Result};
use log::*;
use log::debug;
use once_cell::sync::Lazy;
use poise::serenity_prelude::{
ChannelId, ChannelType, Colour, Context, CreateEmbed, CreateEmbedAuthor, CreateEmbedFooter,
@ -19,7 +19,7 @@ pub fn find_first_image(msg: &Message) -> Option<String> {
.find(|a| {
a.content_type
.as_ref()
.unwrap_or(&"".to_string())
.unwrap_or(&String::new())
.starts_with("image/")
})
.map(|res| res.url.clone())