fix lints

This commit is contained in:
Edvin Bryntesson
2024-08-21 19:38:19 +02:00
parent 1bbadf7b50
commit 7818f83ea2
4 changed files with 6 additions and 6 deletions

View File

@@ -44,8 +44,10 @@ pub enum WindowType {
impl WindowType {
pub const fn default_title(&self) -> &'static str {
match self {
// TODO: Add titles here:
/*match self {
_ => "WINDOW TITLE",
}
}*/
"WINDOW TITLE"
}
}

View File

@@ -18,7 +18,7 @@ impl<'a> CSetContainerContent<'a> {
Self {
window_id,
state_id,
count: slots.len().try_into().unwrap(),
count: slots.len().into(),
slot_data: slots,
carried_item,
}

View File

@@ -2,7 +2,7 @@ use crate::VarInt;
use pumpkin_world::item::Item;
use serde::ser::SerializeSeq;
use serde::{
de::{self, SeqAccess, Visitor},
de::{self, SeqAccess},
Deserialize, Serialize, Serializer,
};
@@ -129,7 +129,6 @@ impl Serialize for Slot {
}
}
impl Slot {
pub fn to_item(self) -> Option<Item> {
let item_id = self.item_id?.0.try_into().unwrap();

View File

@@ -42,7 +42,6 @@ use pumpkin_protocol::{
};
use pumpkin_inventory::WindowType;
use pumpkin_protocol::bytebuf::ByteBuffer;
use pumpkin_protocol::client::play::COpenScreen;
use pumpkin_protocol::slot::Slot;
use pumpkin_world::item::Item;