diff options
author | metamuffin <metamuffin@disroot.org> | 2025-09-30 21:33:38 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-09-30 21:33:38 +0200 |
commit | f15c20e887a58ae8d65c6d4f240d74a3b74cd55d (patch) | |
tree | a5ac3043a46eb33150e6323d22d8bffbc9048d00 /server/src/interaction.rs | |
parent | 080672a5fee18336971fa18ab35bb82fb62a0225 (diff) | |
download | hurrycurry-f15c20e887a58ae8d65c6d4f240d74a3b74cd55d.tar hurrycurry-f15c20e887a58ae8d65c6d4f240d74a3b74cd55d.tar.bz2 hurrycurry-f15c20e887a58ae8d65c6d4f240d74a3b74cd55d.tar.zst |
clippy; make use of is_some_and and is_none_or
Diffstat (limited to 'server/src/interaction.rs')
-rw-r--r-- | server/src/interaction.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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)) }) }); |