From 13ddbc8f5ee434f656ab060c088c4b14194ad5d5 Mon Sep 17 00:00:00 2001 From: jake Date: Fri, 10 Nov 2023 13:35:16 -0700 Subject: [PATCH] get elseware to compile on latest rust --- src/lib.rs | 5 ++--- src/ship/items/floor.rs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2c3d9c0..54fc603 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,12 +1,11 @@ #![allow(clippy::type_complexity)] #![allow(incomplete_features)] #![feature(inline_const)] -#![feature(drain_filter)] +#![feature(extract_if)] #![feature(try_blocks)] -#![feature(once_cell)] #![feature(test)] #![feature(error_generic_member_access)] -#![feature(provide_any)] +#![feature(lazy_cell)] extern crate test; diff --git a/src/ship/items/floor.rs b/src/ship/items/floor.rs index c71b7fd..b0e968f 100644 --- a/src/ship/items/floor.rs +++ b/src/ship/items/floor.rs @@ -96,13 +96,13 @@ pub struct FloorState { impl FloorState { pub fn take_item(&mut self, item_id: &ClientItemId) -> Option { let item = self.local.0 - .drain_filter(|item| { + .extract_if(|item| { item.item_id == *item_id }) .next(); item.or_else(|| { self.shared.0 - .drain_filter(|item| { + .extract_if(|item| { item.item_id == *item_id }) .next()