From f1b5551c67332493f97480b34633516378798a99 Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Sun, 11 Feb 2024 17:21:08 +0900 Subject: [PATCH] refactor: update linting configuration (#88) Signed-off-by: Mogyuchi --- Cargo.toml | 3 +++ main.rs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 797c346..6f7dc21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,3 +17,6 @@ path = "main.rs" [features] default = ["dotenv"] dotenv = ["dep:dotenvy"] + +[lints.clippy] +pedantic = "warn" diff --git a/main.rs b/main.rs index 0b4679c..34e0c38 100644 --- a/main.rs +++ b/main.rs @@ -44,7 +44,7 @@ fn get_env(key: &str) -> String { async fn event_handler( ctx: &serenity::Context, event: &serenity::FullEvent, - _framework: poise::FrameworkContext<'_, (), Error>, + _: poise::FrameworkContext<'_, (), Error>, ) -> Result<(), Error> { match event { serenity::FullEvent::Ready { data_about_bot, .. } => { @@ -73,7 +73,7 @@ async fn event_handler( .to_channel(&ctx.http) .await .ok() - .and_then(|c| c.guild()) + .and_then(poise::serenity_prelude::Channel::guild) else { return Ok(()); };