diff options
| author | seth <[email protected]> | 2023-12-15 03:17:20 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-15 16:41:13 -0500 |
| commit | 8d22f09089b13d013cf94526c205f374bdf873c3 (patch) | |
| tree | 505c864e5683e6ece7d2ead2f9e019b8cc797548 /src/main.rs | |
| parent | ebdcc85dc7c80796446535fa2799bb62f2c12aac (diff) | |
enable clippy::all, clippy::pedantic, & clippy::perf
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 42d7c78..46fadfb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,13 @@ +#![warn(clippy::all, clippy::pedantic, clippy::perf)] +#![allow(clippy::missing_errors_doc, clippy::used_underscore_binding)] +#![forbid(unsafe_code)] + use std::sync::Arc; use std::time::Duration; use color_eyre::eyre::{eyre, Context as _, Report, Result}; use color_eyre::owo_colors::OwoColorize; -use log::*; +use log::{info, warn}; use poise::serenity_prelude::{self as serenity, ShardManager}; use poise::{EditTracker, Framework, FrameworkOptions, PrefixFrameworkOptions}; use redis::ConnectionLike; @@ -60,7 +64,7 @@ async fn setup( let guilds = data.storage.get_opted_guilds().await?; for guild in guilds { - poise::builtins::register_in_guild(ctx, &commands::to_optional_commands(), guild).await?; + poise::builtins::register_in_guild(ctx, &commands::optional(), guild).await?; info!("Registered guild commands to {}", guild); } @@ -87,8 +91,8 @@ async fn main() -> Result<()> { let options = FrameworkOptions { commands: { - let mut commands = commands::to_global_commands(); - commands.append(&mut commands::to_optional_commands()); + let mut commands = commands::global(); + commands.append(&mut commands::optional()); commands }, on_error: |error| Box::pin(handlers::handle_error(error)), |
