refactor: cargo clippy improvements

This commit is contained in:
2025-04-14 23:34:19 -04:00
parent 85e1f082a7
commit f9495a36f2
9 changed files with 42 additions and 47 deletions

View File

@@ -71,9 +71,7 @@ impl UserData for ItemStack {
}
fn add_methods<M: UserDataMethods<Self>>(m: &mut M) {
m.add_method_mut("split", |_, this, count: u32| {
Ok(ItemStack(this.0.split(count)))
});
m.add_method_mut("split", |_, this, count: u32| Ok(Self(this.0.split(count))));
m.add_method_mut("update_empty", |_, this, (): ()| {
this.0.update_empty();
Ok(())