Removed unused #[allow()]'s
This commit is contained in:
parent
e3c392cc80
commit
e08309aacd
@ -6,7 +6,6 @@ use super::Text;
|
|||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
#[serde(tag = "action", content = "contents", rename_all = "snake_case")]
|
#[serde(tag = "action", content = "contents", rename_all = "snake_case")]
|
||||||
#[allow(clippy::enum_variant_names)]
|
|
||||||
pub enum HoverEvent<'a> {
|
pub enum HoverEvent<'a> {
|
||||||
/// Displays a tooltip with the given text.
|
/// Displays a tooltip with the given text.
|
||||||
ShowText(Text<'a>),
|
ShowText(Text<'a>),
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
use pumpkin_world::item::Item;
|
use pumpkin_world::item::Item;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub struct PlayerInventory {
|
pub struct PlayerInventory {
|
||||||
// Main Inventory + Hotbar
|
// Main Inventory + Hotbar
|
||||||
crafting: [Option<Item>; 4],
|
crafting: [Option<Item>; 4],
|
||||||
|
|||||||
@ -22,8 +22,6 @@ pub struct PacketEncoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl PacketEncoder {
|
impl PacketEncoder {
|
||||||
// i think clippy is broken
|
|
||||||
#[allow(clippy::needless_borrows_for_generic_args)]
|
|
||||||
pub fn append_packet<P: ClientPacket>(&mut self, packet: &P) -> Result<(), PacketError> {
|
pub fn append_packet<P: ClientPacket>(&mut self, packet: &P) -> Result<(), PacketError> {
|
||||||
let start_len = self.buf.len();
|
let start_len = self.buf.len();
|
||||||
|
|
||||||
@ -87,6 +85,7 @@ impl PacketEncoder {
|
|||||||
|
|
||||||
let mut front = &mut self.buf[start_len..];
|
let mut front = &mut self.buf[start_len..];
|
||||||
|
|
||||||
|
#[allow(clippy::needless_borrows_for_generic_args)]
|
||||||
VarInt(packet_len as i32)
|
VarInt(packet_len as i32)
|
||||||
.encode(&mut front)
|
.encode(&mut front)
|
||||||
.map_err(|_| PacketError::EncodeLength)?;
|
.map_err(|_| PacketError::EncodeLength)?;
|
||||||
|
|||||||
@ -7,7 +7,6 @@ use serde::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
#[allow(dead_code)]
|
|
||||||
pub struct Slot {
|
pub struct Slot {
|
||||||
item_count: VarInt,
|
item_count: VarInt,
|
||||||
item_id: Option<VarInt>,
|
item_id: Option<VarInt>,
|
||||||
|
|||||||
@ -24,7 +24,6 @@ pub fn get_protocol_id(category: &str, entry: &str) -> u32 {
|
|||||||
.expect("No Entry found")
|
.expect("No Entry found")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn get_default<'a>(category: &str) -> Option<&'a str> {
|
pub fn get_default<'a>(category: &str) -> Option<&'a str> {
|
||||||
REGISTRY
|
REGISTRY
|
||||||
.get(category)
|
.get(category)
|
||||||
|
|||||||
@ -12,7 +12,6 @@ pub trait GeneratorInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub trait WorldGenerator: Sync + Send {
|
pub trait WorldGenerator: Sync + Send {
|
||||||
#[allow(dead_code)]
|
|
||||||
fn generate_chunk(&self, at: Vector2<i32>) -> ChunkData;
|
fn generate_chunk(&self, at: Vector2<i32>) -> ChunkData;
|
||||||
}
|
}
|
||||||
assert_obj_safe! {WorldGenerator}
|
assert_obj_safe! {WorldGenerator}
|
||||||
|
|||||||
@ -9,7 +9,6 @@ use crate::{
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub type SuperflatGenerator = GenericGenerator<SuperflatBiomeGenerator, SuperflatTerrainGenerator>;
|
pub type SuperflatGenerator = GenericGenerator<SuperflatBiomeGenerator, SuperflatTerrainGenerator>;
|
||||||
|
|
||||||
pub(crate) struct SuperflatBiomeGenerator {}
|
pub(crate) struct SuperflatBiomeGenerator {}
|
||||||
|
|||||||
@ -9,7 +9,6 @@ pub use seed::Seed;
|
|||||||
use generator::GeneratorInit;
|
use generator::GeneratorInit;
|
||||||
use implementations::superflat::SuperflatGenerator;
|
use implementations::superflat::SuperflatGenerator;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn get_world_gen(seed: Seed) -> Box<dyn WorldGenerator> {
|
pub fn get_world_gen(seed: Seed) -> Box<dyn WorldGenerator> {
|
||||||
// TODO decide which WorldGenerator to pick based on config.
|
// TODO decide which WorldGenerator to pick based on config.
|
||||||
Box::new(SuperflatGenerator::new(seed))
|
Box::new(SuperflatGenerator::new(seed))
|
||||||
|
|||||||
@ -24,7 +24,6 @@ pub struct ProfileTextures {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Clone, Debug)]
|
#[derive(Deserialize, Clone, Debug)]
|
||||||
#[allow(non_snake_case)]
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub struct Texture {
|
pub struct Texture {
|
||||||
url: String,
|
url: String,
|
||||||
|
|||||||
@ -23,8 +23,9 @@ pub(crate) enum NodeType<'a> {
|
|||||||
run: &'a (dyn Fn(&mut CommandSender, &mut Server, &ConsumedArgs) -> Result<(), InvalidTreeError>
|
run: &'a (dyn Fn(&mut CommandSender, &mut Server, &ConsumedArgs) -> Result<(), InvalidTreeError>
|
||||||
+ Sync),
|
+ Sync),
|
||||||
},
|
},
|
||||||
#[allow(dead_code)] // todo: remove (so far no commands requiring this are implemented)
|
Literal {
|
||||||
Literal { string: &'a str },
|
string: &'a str,
|
||||||
|
},
|
||||||
Argument {
|
Argument {
|
||||||
name: &'a str,
|
name: &'a str,
|
||||||
consumer: ArgumentConsumer<'a>,
|
consumer: ArgumentConsumer<'a>,
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
#![allow(clippy::await_holding_refcell_ref)]
|
|
||||||
#![allow(clippy::await_holding_lock)]
|
#![allow(clippy::await_holding_lock)]
|
||||||
|
|
||||||
#[cfg(target_os = "wasi")]
|
#[cfg(target_os = "wasi")]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user