mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Appease clippy
This commit is contained in:
parent
619f62cb63
commit
19b5ed3487
@ -923,16 +923,11 @@ pub fn handle_manipulate_loadout(
|
||||
// Some(None): No required items
|
||||
// Some(Some(_)): Required items satisfied, contains info about them
|
||||
let has_required_items = match required_item {
|
||||
Some((item_id, consume)) => {
|
||||
if let Some(slot) = data
|
||||
.inventory
|
||||
.and_then(|inv| inv.get_slot_of_item_by_def_id(&item_id))
|
||||
{
|
||||
Some(Some((item_id, slot, consume)))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
},
|
||||
// Produces `None` if we can't find the item or `Some(Some(_))` if we can
|
||||
Some((item_id, consume)) => data
|
||||
.inventory
|
||||
.and_then(|inv| inv.get_slot_of_item_by_def_id(&item_id))
|
||||
.map(|slot| Some((item_id, slot, consume))),
|
||||
None => Some(None),
|
||||
};
|
||||
|
||||
|
@ -287,7 +287,7 @@ pub fn apply_trees_to(
|
||||
},
|
||||
(_, _, _, true) => &StructureBlock::None,
|
||||
(true, _, _, _) => &t.config.trunk_block,
|
||||
(_, true, _, _) => &leaf_block,
|
||||
(_, true, _, _) => leaf_block,
|
||||
_ => &StructureBlock::None,
|
||||
},
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user