Fix clippy warnings
This commit is contained in:
parent
69deba3493
commit
91d72ca3b6
|
@ -144,7 +144,7 @@ impl EventHandler for Handler {
|
|||
|
||||
let members_lock = members.lock().await;
|
||||
|
||||
let computed = discord_to_irc_processing(&msg.content, &**members_lock, &ctx, &roles).await;
|
||||
let computed = discord_to_irc_processing(&msg.content, &members_lock, &ctx, &roles).await;
|
||||
|
||||
if let Some(MessageReference {
|
||||
guild_id,
|
||||
|
@ -163,7 +163,7 @@ impl EventHandler for Handler {
|
|||
let atts: Vec<&str> = reply.attachments.iter().map(|a| &*a.url).collect();
|
||||
content = format!("{} {}", content, atts.join(" "));
|
||||
|
||||
content = discord_to_irc_processing(&content, &**members_lock, &ctx, &roles).await;
|
||||
content = discord_to_irc_processing(&content, &members_lock, &ctx, &roles).await;
|
||||
|
||||
let to_send = (&*content).truncate_ellipse(
|
||||
ref_content_limit
|
||||
|
@ -178,7 +178,7 @@ impl EventHandler for Handler {
|
|||
}
|
||||
|
||||
if let Some((stripped, false)) = computed
|
||||
.strip_prefix(&raw_prefix)
|
||||
.strip_prefix(raw_prefix)
|
||||
.map(str::trim)
|
||||
.and_then(|v| v.strip_suffix('\x0F'))
|
||||
.map(|v| (v, v.is_empty()))
|
||||
|
|
|
@ -127,7 +127,7 @@ pub async fn irc_loop(
|
|||
|
||||
let mut computed = irc_to_discord_processing(
|
||||
message,
|
||||
&*members_lock,
|
||||
&members_lock,
|
||||
&mut id_cache,
|
||||
channels,
|
||||
&emoji_cache,
|
||||
|
@ -253,7 +253,7 @@ fn irc_to_discord_processing(
|
|||
self.members.iter().find_map(|member| {
|
||||
(slice == member.display_name().as_str()
|
||||
|| slice == member.user.name.as_str())
|
||||
.then(|| member.user.id.0)
|
||||
.then_some(member.user.id.0)
|
||||
})
|
||||
})
|
||||
.map(UserId);
|
||||
|
|
Loading…
Reference in a new issue