Fix clippy::module_inception: rename nested modules palette/palette->palette_impl, chunk/chunk->chunk_impl, region/region->region_impl, world/world->world_impl
This commit is contained in:
parent
2419b603c1
commit
5789850310
12 changed files with 13 additions and 14 deletions
|
|
@ -5,13 +5,12 @@ use std::fs;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use crate::io::layer_export::LayerExport;
|
use crate::io::layer_export::LayerExport;
|
||||||
use crate::io::minecraft::{Result, data_version};
|
use crate::io::minecraft::{data_version, Result};
|
||||||
use crate::model::tile::Tile;
|
use crate::model::tile::Tile;
|
||||||
use crate::model::world::World;
|
use crate::model::world::World;
|
||||||
|
|
||||||
use super::chunk::{build_chunk_nbt, build_chunk_nbt_with_layers};
|
use super::chunk::{build_chunk_nbt, build_chunk_nbt_with_layers};
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type RegionTiles<'a> = BTreeMap<(i32, i32), Vec<(&'a (i32, i32), &'a Tile)>>;
|
type RegionTiles<'a> = BTreeMap<(i32, i32), Vec<(&'a (i32, i32), &'a Tile)>>;
|
||||||
|
|
||||||
fn dim_region_path(output_path: &Path, dim_name: &str) -> std::path::PathBuf {
|
fn dim_region_path(output_path: &Path, dim_name: &str) -> std::path::PathBuf {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
pub mod dimension;
|
pub mod dimension;
|
||||||
pub mod world;
|
mod world_impl;
|
||||||
|
|
||||||
pub use dimension::*;
|
pub use dimension::*;
|
||||||
pub use world::*;
|
pub use world_impl::*;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use super::chunk::{Chunk, ChunkSection};
|
use super::chunk_impl::{Chunk, ChunkSection};
|
||||||
|
|
||||||
impl Chunk {
|
impl Chunk {
|
||||||
/// Serialize this chunk back to an NBT Compound tag.
|
/// Serialize this chunk back to an NBT Compound tag.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
mod chunk;
|
mod chunk_impl;
|
||||||
mod chunk_write;
|
mod chunk_write;
|
||||||
|
|
||||||
pub use chunk::*;
|
pub use chunk_impl::*;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
mod region;
|
mod region_impl;
|
||||||
mod region_write;
|
mod region_write;
|
||||||
|
|
||||||
pub use region::*;
|
pub use region_impl::*;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::compression::{self, CompressionType};
|
use crate::compression::{self, CompressionType};
|
||||||
|
|
||||||
use super::region::{Region, Result};
|
use super::region_impl::{Region, Result};
|
||||||
|
|
||||||
impl Region {
|
impl Region {
|
||||||
/// Serialize region back to .mca bytes.
|
/// Serialize region back to .mca bytes.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
mod palette;
|
mod palette_impl;
|
||||||
mod palette_io;
|
mod palette_io;
|
||||||
|
|
||||||
pub use palette::*;
|
pub use palette_impl::*;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use terrafier_nbt::Tag;
|
use terrafier_nbt::Tag;
|
||||||
|
|
||||||
use super::palette::{BlockPalette, BlockState};
|
use super::palette_impl::{BlockPalette, BlockState};
|
||||||
|
|
||||||
impl BlockState {
|
impl BlockState {
|
||||||
/// Parse from `TAG_Compound` with `"Name"` and optional `"Properties"`.
|
/// Parse from `TAG_Compound` with `"Name"` and optional `"Properties"`.
|
||||||
|
|
@ -73,7 +73,7 @@ impl BlockPalette {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::super::palette::{BlockPalette, BlockState};
|
use super::super::palette_impl::{BlockPalette, BlockState};
|
||||||
use terrafier_nbt::Tag;
|
use terrafier_nbt::Tag;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue