diff options
| author | nieboczek <bartekkoraliki@gmail.com> | 2025-12-16 15:26:02 +0100 |
|---|---|---|
| committer | nieboczek <bartekkoraliki@gmail.com> | 2025-12-16 15:30:01 +0100 |
| commit | 348e44880c81f1d223f53ab11897bae427073d42 (patch) | |
| tree | 81ff7f3a167cdd5a4652f85441dc4607c317081b /server/bot/src | |
| parent | 6419d8c8139d697af309b7db2e698effa8290582 (diff) | |
| download | hurrycurry-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.rs | 2 |
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> { |