Fix: all clippy warns
This commit is contained in:
1 parent
a6d9ed216d
commit
de7b3aa2ea
21 files changed
+35
-53
No files matched your search
@@ -1,30 +1,3 @@
|
||||
// use fastnbt::nbt;
|
||||
|
||||
// pub const BLOCKS_AND_BIOMES: [u8; 2000] = [0x80; 2000];
|
||||
// pub const SKY_LIGHT_ARRAYS: [FixedArray<u8, 2048>; 26] = [FixedArray([0xff; 2048]); 26];
|
||||
|
||||
// #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
// #[repr(transparent)]
|
||||
// pub struct FixedArray<T, const N: usize>(pub [T; N]);
|
||||
|
||||
// pub struct TestChunk {
|
||||
// pub heightmap: Vec<u8>,
|
||||
// }
|
||||
|
||||
// impl Default for TestChunk {
|
||||
// fn default() -> Self {
|
||||
// Self::new()
|
||||
// }
|
||||
// }
|
||||
|
||||
// impl TestChunk {
|
||||
// pub fn new() -> Self {
|
||||
// let bytes = fastnbt::to_bytes(&nbt!({"MOTION_BLOCKING": [L; 123, 256]})).unwrap();
|
||||
|
||||
// Self { heightmap: bytes }
|
||||
// }
|
||||
// }
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use fastnbt::LongArray;
|
||||
@@ -58,6 +31,7 @@ pub struct ChunkHeightmaps {
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize, Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct ChunkSection {
|
||||
#[serde(rename = "Y")]
|
||||
y: i32,
|
||||
@@ -65,6 +39,7 @@ struct ChunkSection {
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize, Debug)]
|
||||
#[allow(dead_code)]
|
||||
struct ChunkNbt {
|
||||
#[serde(rename = "DataVersion")]
|
||||
data_version: usize,
|
||||
|
||||
@@ -26,6 +26,7 @@ pub fn get_protocol_id(category: &str, entry: &str) -> u32 {
|
||||
.expect("No Entry found")
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get_default<'a>(category: &str) -> Option<&'a str> {
|
||||
REGISTRY
|
||||
.get(category)
|
||||
|
||||
@@ -32,10 +32,12 @@ lazy_static! {
|
||||
serde_json::from_str(ITEMS_JSON).expect("Could not parse items.json registry.");
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get_item_element(item_id: &str) -> &ItemComponents {
|
||||
&ITEMS.get(item_id).expect("Item not found").components
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get_item_protocol_id(item_id: &str) -> u32 {
|
||||
global_registry::get_protocol_id(ITEM_REGISTRY, item_id)
|
||||
}
|
||||
@@ -8,13 +8,11 @@ use flate2::{bufread::ZlibDecoder, read::GzDecoder};
|
||||
use itertools::Itertools;
|
||||
use rayon::prelude::*;
|
||||
use thiserror::Error;
|
||||
use tokio::{
|
||||
io::{AsyncReadExt, AsyncSeekExt},
|
||||
sync::mpsc,
|
||||
};
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
use crate::chunk::ChunkData;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct Level {
|
||||
root_folder: PathBuf,
|
||||
region_folder: PathBuf,
|
||||
|
||||
Reference in new issue
Block a user