Fix clippy warnings: needless_range_loop, collapsible_if, borrowed_box, type_complexity, dead code cleanup
This commit is contained in:
parent
fa05187f1c
commit
3d3798136d
22 changed files with 579 additions and 428 deletions
|
|
@ -84,6 +84,12 @@ pub struct BlockPalette {
|
|||
index_map: HashMap<BlockState, u32>,
|
||||
}
|
||||
|
||||
impl Default for BlockPalette {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl BlockPalette {
|
||||
pub fn new() -> Self {
|
||||
BlockPalette {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@ pub struct SectionData {
|
|||
pub storage: BitArray,
|
||||
}
|
||||
|
||||
impl Default for SectionData {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl SectionData {
|
||||
/// Create a new section filled with air.
|
||||
pub fn new() -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue