From c0a63bd75629a143c9216201b30aa6fb2908a920 Mon Sep 17 00:00:00 2001
From: ErrorNoInternet <errornointernet@envs.net>
Date: Mon, 17 Mar 2025 07:19:32 -0400
Subject: [PATCH] refactor(lua): pass set client information error

---
 src/lua/client/state.rs | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/lua/client/state.rs b/src/lua/client/state.rs
index fb69672..48e8167 100644
--- a/src/lua/client/state.rs
+++ b/src/lua/client/state.rs
@@ -6,7 +6,6 @@ use azalea::{
     protocol::common::client_information::ModelCustomization,
 };
 use azalea_hax::AntiKnockback;
-use log::error;
 use mlua::{Error, Lua, Result, Table, UserDataRef};
 
 pub fn air_supply(_lua: &Lua, client: &Client) -> Result<i32> {
@@ -35,8 +34,7 @@ pub async fn set_client_information(
     info: Table,
 ) -> Result<()> {
     let get_bool = |table: &Table, name| table.get(name).unwrap_or(true);
-
-    if let Err(error) = client
+    client
         .set_client_information(ClientInformation {
             allows_listing: info.get("allows_listing")?,
             model_customization: info
@@ -55,10 +53,7 @@ pub async fn set_client_information(
             ..ClientInformation::default()
         })
         .await
-    {
-        error!("failed to set client client information: {error:?}");
-    }
-    Ok(())
+        .map_err(Error::external)
 }
 
 pub fn set_component(