aboutsummaryrefslogtreecommitdiff
path: root/server/bot/src
diff options
context:
space:
mode:
authornieboczek <bartekkoraliki@gmail.com>2025-12-16 15:26:02 +0100
committernieboczek <bartekkoraliki@gmail.com>2025-12-16 15:30:01 +0100
commit348e44880c81f1d223f53ab11897bae427073d42 (patch)
tree81ff7f3a167cdd5a4652f85441dc4607c317081b /server/bot/src
parent6419d8c8139d697af309b7db2e698effa8290582 (diff)
downloadhurrycurry-348e44880c81f1d223f53ab11897bae427073d42.tar
hurrycurry-348e44880c81f1d223f53ab11897bae427073d42.tar.bz2
hurrycurry-348e44880c81f1d223f53ab11897bae427073d42.tar.zst
Return an Iterator over recipe inputs and outputs instead of a Vec
Diffstat (limited to 'server/bot/src')
-rw-r--r--server/bot/src/algos/simple.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/bot/src/algos/simple.rs b/server/bot/src/algos/simple.rs
index 050c2081..ba617707 100644
--- a/server/bot/src/algos/simple.rs
+++ b/server/bot/src/algos/simple.rs
@@ -120,7 +120,7 @@ impl<S> Context<'_, S> {
.recipes
.iter()
.enumerate()
- .find(|(_, r)| r.outputs().contains(&item))
+ .find(|(_, r)| r.outputs().any(|i| i == item))
.map(|(i, _)| RecipeIndex(i))
}
pub fn find_item_on_map(&self, item: ItemIndex) -> Option<IVec2> {