Fix clippy::manual_flatten, use flatten()

This commit is contained in:
ice_iix 2021-06-18 15:04:41 -07:00
parent d15229dd0b
commit 53a0bc9fb6
1 changed files with 22 additions and 24 deletions

View File

@ -1902,8 +1902,7 @@ impl Server {
}
fn load_block_entities(&mut self, block_entities: Vec<Option<crate::nbt::NamedTag>>) {
for optional_block_entity in block_entities {
if let Some(block_entity) = optional_block_entity {
for block_entity in block_entities.into_iter().flatten() {
let x = block_entity.1.get("x").unwrap().as_int().unwrap();
let y = block_entity.1.get("y").unwrap().as_int().unwrap();
let z = block_entity.1.get("z").unwrap().as_int().unwrap();
@ -1929,7 +1928,6 @@ impl Server {
}
}
}
}
fn on_chunk_data_biomes3d_varint(
&mut self,