mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
Cargo fmt + added *.local.nbt to .gitignore
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -85,4 +85,7 @@ world/
|
||||
|
||||
# project's binary configurations
|
||||
configuration.toml
|
||||
features.toml
|
||||
features.toml
|
||||
|
||||
|
||||
*.local.nbt
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user