From b45dc205295cb1aa2cd1a61c6a6f4c841de376a6 Mon Sep 17 00:00:00 2001 From: shibedrill Date: Sat, 5 Oct 2024 00:31:29 -0400 Subject: [PATCH] Formatting --- build.rs | 5 ++--- src/command/devel.rs | 4 ++-- src/definitions.rs | 7 ++----- src/main.rs | 2 +- src/schema.rs | 5 ++--- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/build.rs b/build.rs index 95eaa26..b208c67 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,5 @@ - -use vergen::*; use anyhow::Error; +use vergen::*; fn main() -> Result<(), Error> { let build = BuildBuilder::all_build()?; @@ -13,4 +12,4 @@ fn main() -> Result<(), Error> { .add_instructions(&rustc)? .emit()?; Ok(()) -} \ No newline at end of file +} diff --git a/src/command/devel.rs b/src/command/devel.rs index 46ef861..7f8b03c 100644 --- a/src/command/devel.rs +++ b/src/command/devel.rs @@ -1,4 +1,3 @@ - use crate::Context; use crate::Error; @@ -16,7 +15,8 @@ pub async fn version(ctx: Context<'_>) -> Result<(), Error> { env!("VERGEN_BUILD_TIMESTAMP"), env!("VERGEN_CARGO_TARGET_TRIPLE"), env!("VERGEN_RUSTC_SEMVER"), - )).await?; + )) + .await?; Ok(()) } diff --git a/src/definitions.rs b/src/definitions.rs index e95ca7d..e870948 100644 --- a/src/definitions.rs +++ b/src/definitions.rs @@ -6,9 +6,7 @@ use poise::serenity_prelude as serenity; use crate::settings::*; // Data passed to every command (shared state) -pub struct Data { - -} +pub struct Data {} // Errors returnable by a command pub type Error = Box; @@ -22,9 +20,8 @@ pub async fn event_handler( _framework: poise::FrameworkContext<'_, Data, Error>, _data: &Data, ) -> Result<(), Error> { - // Future event handling will go here // Data will contain the database connection Ok(()) -} \ No newline at end of file +} diff --git a/src/main.rs b/src/main.rs index 83ddd97..bec1540 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,8 +13,8 @@ extern crate log; // Definitions mod definitions; +use crate::definitions::event_handler; use crate::definitions::*; -use crate::definitions::event_handler as event_handler; // Settings manager mod settings; diff --git a/src/schema.rs b/src/schema.rs index 118691c..309881e 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -1,4 +1,3 @@ -use structstruck; use poise::serenity_prelude::*; structstruck::strike! { @@ -7,7 +6,7 @@ structstruck::strike! { role: Role, message: Message, reaction: ReactionType, - variant: + variant: #[allow(dead_code)] enum ReactionRoleVariant { Standard, @@ -16,4 +15,4 @@ structstruck::strike! { Reverse, } } -} \ No newline at end of file +}