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