mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-04-19 02:55:08 +02:00
treewide: cargo fmt with 1.85
This commit is contained in:
parent
7bba5bae55
commit
775fcb2d1b
8 changed files with 18 additions and 20 deletions
|
@ -2,11 +2,11 @@
|
|||
|
||||
use std::{
|
||||
fs::File,
|
||||
io::{prelude::*, SeekFrom},
|
||||
io::{SeekFrom, prelude::*},
|
||||
path::Path,
|
||||
};
|
||||
|
||||
use anyhow::{bail, Context, Result};
|
||||
use anyhow::{Context, Result, bail};
|
||||
use flate2::read::ZlibDecoder;
|
||||
use serde::de::DeserializeOwned;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ mod legacy_block_types;
|
|||
use std::collections::HashMap;
|
||||
|
||||
use bincode::{BorrowDecode, Decode, Encode};
|
||||
use enumflags2::{bitflags, BitFlags};
|
||||
use enumflags2::{BitFlags, bitflags};
|
||||
|
||||
/// Flags describing special properties of [BlockType]s
|
||||
#[bitflags]
|
||||
|
|
|
@ -205,8 +205,10 @@ pub fn cli() -> Result<()> {
|
|||
if config.num_threads != config.num_threads_initial {
|
||||
pool = setup_threads(config.num_threads)?;
|
||||
}
|
||||
pool.install(move || loop {
|
||||
pool.install(move || {
|
||||
loop {
|
||||
wait_watcher(&args, &watch_channel)?;
|
||||
generate(&config, &rt)?;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ use tracing::{debug, info};
|
|||
use super::{common::*, region_group::RegionGroup};
|
||||
use crate::{
|
||||
io::{fs, storage},
|
||||
resource::{block_color, needs_biome, Colorf},
|
||||
resource::{Colorf, block_color, needs_biome},
|
||||
types::*,
|
||||
util::coord_offset,
|
||||
};
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
//! over different data versions as much as possible.
|
||||
|
||||
use std::{
|
||||
collections::{btree_map, BTreeMap},
|
||||
collections::{BTreeMap, btree_map},
|
||||
iter::{self, FusedIterator},
|
||||
};
|
||||
|
||||
use anyhow::{bail, Context, Result};
|
||||
use anyhow::{Context, Result, bail};
|
||||
|
||||
use super::{block_entity::BlockEntity, de, section::*};
|
||||
use crate::{
|
||||
|
|
|
@ -185,9 +185,9 @@ mod json_color {
|
|||
|
||||
use minedmap_resource::Color;
|
||||
use serde::{
|
||||
Deserializer, Serializer,
|
||||
de::{self, Visitor},
|
||||
ser::Error as _,
|
||||
Deserializer, Serializer,
|
||||
};
|
||||
|
||||
/// Named JSON text colors
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
use std::fmt::Debug;
|
||||
|
||||
use anyhow::{bail, Context, Result};
|
||||
use anyhow::{Context, Result, bail};
|
||||
use num_integer::div_rem;
|
||||
use tracing::debug;
|
||||
|
||||
|
@ -400,10 +400,6 @@ impl<'a> BlockLight<'a> {
|
|||
let (offset, nibble) = div_rem(coords.offset(), 2);
|
||||
let byte = block_light[offset] as u8;
|
||||
|
||||
if nibble == 1 {
|
||||
byte >> 4
|
||||
} else {
|
||||
byte & 0xf
|
||||
}
|
||||
if nibble == 1 { byte >> 4 } else { byte & 0xf }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue