From 8d22f09089b13d013cf94526c205f374bdf873c3 Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 15 Dec 2023 03:17:20 -0500 Subject: enable clippy::all, clippy::pedantic, & clippy::perf --- src/utils.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index e4ac03e..1a96359 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -19,6 +19,7 @@ pub fn random_choice(arr: [&str; N]) -> Result { } // waiting for `round_char_boundary` to stabilize +#[allow(clippy::cast_possible_wrap)] pub fn floor_char_boundary(s: &str, index: usize) -> usize { if index >= s.len() { s.len() @@ -105,7 +106,7 @@ pub async fn resolve_message_to_embed(ctx: &serenity::Context, msg: &Message) -> if attachments_len > 1 { embed.footer(|footer| { // yes it will say '1 attachments' no i do not care - footer.text(format!("{} attachments", attachments_len)) + footer.text(format!("{attachments_len} attachments")) }); } -- cgit v1.2.3