refactor: expand a few variable names
This commit is contained in:
parent
e7133ecc5f
commit
f96ad40276
@ -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);
|
||||
|
@ -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<_>>()
|
||||
}
|
||||
|
||||
|
@ -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>> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user