refactor: expand a few variable names

This commit is contained in:
Ryan 2025-03-20 17:47:18 -04:00
parent e7133ecc5f
commit f96ad40276
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3
3 changed files with 6 additions and 5 deletions

View File

@ -46,7 +46,7 @@ pub async fn handle_event(client: Client, event: Event, state: State) -> Result<
.call::<String>((options.clone(), content.clone()))
.ok()
.as_deref()
.and_then(|s| trim_header(s).ok())
.and_then(|string| trim_header(string).ok())
{
is_encrypted = true;
ncr_options = Some(options);

View File

@ -22,9 +22,10 @@ pub fn held_slot(_lua: &Lua, client: &Client) -> Result<u8> {
#[allow(clippy::too_many_lines)]
pub fn menu(lua: &Lua, client: &Client) -> Result<Value> {
fn from_slot_list<const N: usize>(s: SlotList<N>) -> Vec<ItemStack> {
s.iter()
.map(|i| ItemStack(i.to_owned()))
fn from_slot_list<const N: usize>(slot_list: SlotList<N>) -> Vec<ItemStack> {
slot_list
.iter()
.map(|item_stack| ItemStack(item_stack.to_owned()))
.collect::<Vec<_>>()
}

View File

@ -28,7 +28,7 @@ pub fn get_block_state(_lua: &Lua, client: &Client, position: Vec3) -> Result<Op
position.y as i32,
position.z as i32,
))
.map(|b| b.id))
.map(|block| block.id))
}
pub fn get_fluid_state(lua: &Lua, client: &Client, position: Vec3) -> Result<Option<Table>> {