diff --git a/src/lib/default_commands/src/echo.rs b/src/lib/default_commands/src/echo.rs index 8b7aff81..1f94ec58 100644 --- a/src/lib/default_commands/src/echo.rs +++ b/src/lib/default_commands/src/echo.rs @@ -1,8 +1,14 @@ use std::sync::Arc; use ferrumc_commands::{ - arg::{parser::{string::GreedyStringParser, ArgumentParser}, CommandArgument}, ctx::CommandContext, executor, - infrastructure::register_command, Command, CommandResult, + arg::{ + parser::{string::GreedyStringParser, ArgumentParser}, + CommandArgument, + }, + ctx::CommandContext, + executor, + infrastructure::register_command, + Command, CommandResult, }; use ferrumc_core::identity::player_identity::PlayerIdentity; use ferrumc_macros::{arg, command}; @@ -12,7 +18,11 @@ use ferrumc_text::{NamedColor, TextComponentBuilder}; #[command("echo")] async fn echo(ctx: Arc) -> CommandResult { let message = ctx.arg::("message"); - let identity = ctx.state.universe.get::(ctx.connection_id).expect("failed to get identity"); + let identity = ctx + .state + .universe + .get::(ctx.connection_id) + .expect("failed to get identity"); ctx.reply( TextComponentBuilder::new(format!("{} said: {message}", identity.username)) diff --git a/src/lib/derive_macros/src/commands/mod.rs b/src/lib/derive_macros/src/commands/mod.rs index d804b63d..c98fc544 100644 --- a/src/lib/derive_macros/src/commands/mod.rs +++ b/src/lib/derive_macros/src/commands/mod.rs @@ -1,12 +1,13 @@ use std::{ collections::HashMap, - sync::{Arc, Mutex, OnceLock}, + sync::{Mutex, OnceLock}, }; use proc_macro::TokenStream; use quote::{format_ident, quote, ToTokens}; use syn::{ - parse::{Parse, ParseStream}, parse_macro_input, Expr, Ident, ItemFn, LitBool, LitStr, Result as SynResult, Token + parse::{Parse, ParseStream}, + parse_macro_input, Expr, ItemFn, LitBool, LitStr, Result as SynResult, Token, }; static PENDING_ARGS: OnceLock>>> = OnceLock::new();