Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
4lve committed Feb 22, 2025
1 parent acdc205 commit ecf54ea
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pumpkin-inventory/src/container_click.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl Click {
};
Ok(Self {
click_type: ClickType::DropType(drop_type),
slot: slot,
slot,
})
}

Expand Down
38 changes: 19 additions & 19 deletions pumpkin-world/src/item/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use crate::item::ItemStack;
impl ItemStack {
pub fn is_sword(&self) -> bool {
[
Item::WOODEN_SWORD.id, // Wooden
Item::STONE_SWORD.id, // Stone
Item::GOLDEN_SWORD.id, // Gold
Item::IRON_SWORD.id, // Iron
Item::DIAMOND_SWORD.id, // Diamond
Item::WOODEN_SWORD.id, // Wooden
Item::STONE_SWORD.id, // Stone
Item::GOLDEN_SWORD.id, // Gold
Item::IRON_SWORD.id, // Iron
Item::DIAMOND_SWORD.id, // Diamond
Item::NETHERITE_SWORD.id, // Netherite
]
.contains(&self.item.id)
Expand All @@ -19,11 +19,11 @@ impl ItemStack {
[
// Leather
Item::NETHERITE_HELMET.id, // Netherite
Item::TURTLE_HELMET.id, // Turtle helmet
Item::TURTLE_HELMET.id, // Turtle helmet
Item::CHAINMAIL_HELMET.id, // Chainmail
Item::DIAMOND_HELMET.id, // Diamond
Item::GOLDEN_HELMET.id, // Gold
Item::IRON_HELMET.id, // Iron
Item::DIAMOND_HELMET.id, // Diamond
Item::GOLDEN_HELMET.id, // Gold
Item::IRON_HELMET.id, // Iron
Item::LEATHER_HELMET.id,
]
.contains(&self.item.id)
Expand All @@ -34,10 +34,10 @@ impl ItemStack {
// Leather
Item::NETHERITE_CHESTPLATE.id, // Netherite
Item::CHAINMAIL_CHESTPLATE.id, // Chainmail
Item::DIAMOND_CHESTPLATE.id, // Diamond
Item::GOLDEN_CHESTPLATE.id, // Gold
Item::IRON_CHESTPLATE.id, // Iron
Item::ELYTRA.id, // Elytra
Item::DIAMOND_CHESTPLATE.id, // Diamond
Item::GOLDEN_CHESTPLATE.id, // Gold
Item::IRON_CHESTPLATE.id, // Iron
Item::ELYTRA.id, // Elytra
Item::LEATHER_CHESTPLATE.id,
]
.contains(&self.item.id)
Expand All @@ -48,9 +48,9 @@ impl ItemStack {
// Leather
Item::NETHERITE_LEGGINGS.id, // Netherite
Item::CHAINMAIL_LEGGINGS.id, // Chainmail
Item::DIAMOND_LEGGINGS.id, // Diamond
Item::GOLDEN_LEGGINGS.id, // Gold
Item::IRON_LEGGINGS.id, // Iron
Item::DIAMOND_LEGGINGS.id, // Diamond
Item::GOLDEN_LEGGINGS.id, // Gold
Item::IRON_LEGGINGS.id, // Iron
Item::LEATHER_LEGGINGS.id,
]
.contains(&self.item.id)
Expand All @@ -61,9 +61,9 @@ impl ItemStack {
// Leather
Item::NETHERITE_BOOTS.id, // Netherite
Item::CHAINMAIL_BOOTS.id, // Chainmail
Item::DIAMOND_BOOTS.id, // Diamond
Item::GOLDEN_BOOTS.id, // Gold
Item::IRON_BOOTS.id, // Iron
Item::DIAMOND_BOOTS.id, // Diamond
Item::GOLDEN_BOOTS.id, // Gold
Item::IRON_BOOTS.id, // Iron
Item::LEATHER_BOOTS.id,
]
.contains(&self.item.id)
Expand Down
2 changes: 0 additions & 2 deletions pumpkin/src/net/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ impl Player {

match slot {
container_click::Slot::Normal(slot) => {
println!("slot: {:?}", slot);

let mut all_slots = container.all_slots();

// Get the item data we need before any mutable operations
Expand Down

0 comments on commit ecf54ea

Please sign in to comment.