mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
fix lints
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user