aboutsummaryrefslogtreecommitdiff
path: root/server/bot/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-30 21:33:38 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-30 21:33:38 +0200
commitf15c20e887a58ae8d65c6d4f240d74a3b74cd55d (patch)
treea5ac3043a46eb33150e6323d22d8bffbc9048d00 /server/bot/src
parent080672a5fee18336971fa18ab35bb82fb62a0225 (diff)
downloadhurrycurry-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/bot/src')
-rw-r--r--server/bot/src/algos/customer.rs2
-rw-r--r--server/bot/src/algos/simple.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs
index cb5c5b59..8a53ac20 100644
--- a/server/bot/src/algos/customer.rs
+++ b/server/bot/src/algos/customer.rs
@@ -143,7 +143,7 @@ impl CustomerState {
game.data
.tile_placeable_items
.get(&t.kind)
- .map_or(true, |p| p.contains(&requested_item))
+ .is_none_or(|p| p.contains(&requested_item))
}) {
facing = off.as_vec2();
}
diff --git a/server/bot/src/algos/simple.rs b/server/bot/src/algos/simple.rs
index 42cc4223..914e8809 100644
--- a/server/bot/src/algos/simple.rs
+++ b/server/bot/src/algos/simple.rs
@@ -134,7 +134,7 @@ impl<S> Context<'_, S> {
.data
.tile_placeable_items
.get(&t.kind)
- .map_or(true, |placable| placable.contains(item))
+ .is_none_or(|placable| placable.contains(item))
})
})
.map(|off| pos + off)