From f15c20e887a58ae8d65c6d4f240d74a3b74cd55d Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 30 Sep 2025 21:33:38 +0200 Subject: clippy; make use of is_some_and and is_none_or --- server/src/interaction.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/src/interaction.rs') diff --git a/server/src/interaction.rs b/server/src/interaction.rs index 5a8372ee..fef1ca40 100644 --- a/server/src/interaction.rs +++ b/server/src/interaction.rs @@ -168,11 +168,11 @@ pub fn interact( } } - let can_place = tile.map_or(true, |tile| { - other.as_ref().map_or(false, |other| { + let can_place = tile.is_none_or(|tile| { + other.as_ref().is_some_and(|other| { data.tile_placeable_items .get(&tile) - .map_or(true, |pl| pl.contains(&other.kind)) + .is_none_or(|pl| pl.contains(&other.kind)) }) }); -- cgit v1.2.3-70-g09d2