diff options
| author | Sculas <contact@sculas.xyz> | 2022-10-17 20:18:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-17 13:18:25 -0500 |
| commit | d4d4ba054f4da0dcf550524523792ee79268d40d (patch) | |
| tree | 7fcf3e70653caa2a88a99b57691ab5725c27f454 /azalea-world/src | |
| parent | 96e94aa424bf4468bcd6106ed43dc7990bead2d5 (diff) | |
| download | azalea-drasl-d4d4ba054f4da0dcf550524523792ee79268d40d.tar.xz | |
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.
Diffstat (limited to 'azalea-world/src')
| -rw-r--r-- | azalea-world/src/chunk_storage.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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(()) |
