Cargo fmt + added *.local.nbt to .gitignore
This commit is contained in:
parent
0d05e5ef36
commit
c02200c7fd
3
.gitignore
vendored
3
.gitignore
vendored
@ -86,3 +86,6 @@ world/
|
|||||||
# project's binary configurations
|
# project's binary configurations
|
||||||
configuration.toml
|
configuration.toml
|
||||||
features.toml
|
features.toml
|
||||||
|
|
||||||
|
|
||||||
|
*.local.nbt
|
||||||
@ -168,7 +168,9 @@ impl ByteBuffer {
|
|||||||
/// some, then it also calls the `write` closure.
|
/// some, then it also calls the `write` closure.
|
||||||
pub fn put_option<T>(&mut self, val: &Option<T>, write: impl FnOnce(&mut Self, &T)) {
|
pub fn put_option<T>(&mut self, val: &Option<T>, write: impl FnOnce(&mut Self, &T)) {
|
||||||
self.put_bool(val.is_some());
|
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> {
|
pub fn get_list<T>(&mut self, val: impl Fn(&mut Self) -> T) -> Vec<T> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user