Skip to content

Commit

Permalink
Merge branch 'Snowiiii:master' into docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Erb3 authored Aug 21, 2024
2 parents e6e63c6 + c02200c commit 491ff10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@ world/

# project's binary configurations
configuration.toml
features.toml
features.toml


*.local.nbt
4 changes: 3 additions & 1 deletion pumpkin-protocol/src/bytebuf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ impl ByteBuffer {
/// some, then it also calls the `write` closure.
pub fn put_option<T>(&mut self, val: &Option<T>, 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<T>(&mut self, val: impl Fn(&mut Self) -> T) -> Vec<T> {
Expand Down

0 comments on commit 491ff10

Please sign in to comment.