From c02200c7fd8533be658bcc0ca09f5211eabaad44 Mon Sep 17 00:00:00 2001 From: lukas0008 Date: Wed, 21 Aug 2024 18:06:57 +0200 Subject: [PATCH] Cargo fmt + added *.local.nbt to .gitignore --- .gitignore | 5 ++++- pumpkin-protocol/src/bytebuf/mod.rs | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9d1ee4bda..a8bc3a134 100644 --- a/.gitignore +++ b/.gitignore @@ -85,4 +85,7 @@ world/ # project's binary configurations configuration.toml -features.toml \ No newline at end of file +features.toml + + +*.local.nbt \ No newline at end of file diff --git a/pumpkin-protocol/src/bytebuf/mod.rs b/pumpkin-protocol/src/bytebuf/mod.rs index fa275bb15..11d304223 100644 --- a/pumpkin-protocol/src/bytebuf/mod.rs +++ b/pumpkin-protocol/src/bytebuf/mod.rs @@ -168,7 +168,9 @@ impl ByteBuffer { /// some, then it also calls the `write` closure. pub fn put_option(&mut self, val: &Option, write: impl FnOnce(&mut Self, &T)) { self.put_bool(val.is_some()); - if let Some(v) = val { write(self, v) } + if let Some(v) = val { + write(self, v) + } } pub fn get_list(&mut self, val: impl Fn(&mut Self) -> T) -> Vec {