From d4d4ba054f4da0dcf550524523792ee79268d40d Mon Sep 17 00:00:00 2001 From: Sculas Date: Mon, 17 Oct 2022 20:18:25 +0200 Subject: refactor: remove println statements (#31) This PR removes all println statements and logs them on trace level instead. Normally, libraries shouldn't print to stdout using println, since there's no control over them. --- azalea-world/src/chunk_storage.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'azalea-world/src') diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index 566b3198..daabb214 100644 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -104,7 +104,7 @@ impl ChunkStorage { data: &mut Cursor<&[u8]>, ) -> Result<(), BufReadError> { if !self.in_range(pos) { - println!( + log::trace!( "Ignoring chunk since it's not in the view range: {}, {}", pos.x, pos.z ); @@ -115,7 +115,8 @@ impl ChunkStorage { data, self.height, )?)); - println!("Loaded chunk {:?}", pos); + + log::trace!("Loaded chunk {:?}", pos); self[pos] = Some(chunk); Ok(()) -- cgit v1.2.3