From 2abf7cd016cec35007be198087670196d00079d6 Mon Sep 17 00:00:00 2001 From: Joshua Yanovski Date: Mon, 16 Sep 2019 04:05:36 +0200 Subject: [PATCH] Fixing more rustfmt errors. --- server/src/lib.rs | 6 +++--- world/src/lib.rs | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/src/lib.rs b/server/src/lib.rs index 2b905e6f18..2680f98018 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -27,7 +27,7 @@ use common::{ vol::{ReadVol, RectVolSize, Vox}, }; use crossbeam::channel; -use hashbrown::{HashMap, hash_map::Entry}; +use hashbrown::{hash_map::Entry, HashMap}; use log::debug; use metrics::ServerMetrics; use rand::Rng; @@ -73,11 +73,11 @@ pub struct Server { thread_pool: ThreadPool, chunk_tx: channel::Sender<( Vec2, - Result<(TerrainChunk, ChunkSupplement), EcsEntity> + Result<(TerrainChunk, ChunkSupplement), EcsEntity>, )>, chunk_rx: channel::Receiver<( Vec2, - Result<(TerrainChunk, ChunkSupplement), EcsEntity> + Result<(TerrainChunk, ChunkSupplement), EcsEntity>, )>, pending_chunks: HashMap, Arc>, diff --git a/world/src/lib.rs b/world/src/lib.rs index 6ecac0b33c..65d929d9e1 100644 --- a/world/src/lib.rs +++ b/world/src/lib.rs @@ -71,7 +71,8 @@ impl World { pub fn generate_chunk( &self, chunk_pos: Vec2, - flag: &AtomicBool) -> Result<(TerrainChunk, ChunkSupplement), ()> { + flag: &AtomicBool, + ) -> Result<(TerrainChunk, ChunkSupplement), ()> { let air = Block::empty(); let stone = Block::new(BlockKind::Dense, Rgb::new(200, 220, 255)); let water = Block::new(BlockKind::Water, Rgb::new(60, 90, 190)); @@ -108,7 +109,7 @@ impl World { for x in 0..TerrainChunkSize::RECT_SIZE.x as i32 { for y in 0..TerrainChunkSize::RECT_SIZE.y as i32 { if flag.load(Ordering::Relaxed) { - return Err(()) + return Err(()); }; let wpos2d = Vec2::new(x, y) + Vec2::from(chunk_pos) * TerrainChunkSize::RECT_SIZE.map(|e| e as i32);