Fix all clippy warnings: collapsible_if, for_kv_map, vec_init_then_push, let_and_return, manual_div_ceil, useless_conversion, needless_borrows, manual_is_multiple_of, new_without_default, unnecessary_lazy_evaluations

This commit is contained in:
loki5512344 2026-07-04 12:16:53 +02:00
parent 2d2057ee87
commit 887a37e64c
9 changed files with 49 additions and 53 deletions

View file

@ -21,6 +21,7 @@ fn dim_region_path(output_path: &Path, dim_name: &str) -> std::path::PathBuf {
}
}
#[allow(clippy::type_complexity)]
fn write_dimension(
dim: &crate::model::dimension::Dimension,
output_path: &Path,

View file

@ -63,8 +63,7 @@ fn make_chunk_nbt_gzip(cx: i32, cz: i32) -> Vec<u8> {
biomes.insert("palette".into(), Tag::List(biome_palette));
section.insert("biomes".into(), Tag::Compound(biomes));
let mut sections = Vec::new();
sections.push(Tag::Compound(section));
let sections = vec![Tag::Compound(section)];
chunk.insert("sections".into(), Tag::List(sections));
to_gzip_bytes(&Tag::Compound(chunk)).unwrap()
@ -133,7 +132,7 @@ fn test_golden_mca_roundtrip() {
std::fs::create_dir_all(world_path.join("region")).unwrap();
// Write level.dat
std::fs::write(world_path.join("level.dat"), &make_level_dat()).unwrap();
std::fs::write(world_path.join("level.dat"), make_level_dat()).unwrap();
// Build and write region r.0.0.mca
let chunk_gzip = make_chunk_nbt_gzip(0, 0);