summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-rpg/rpg-cli/files/rpg-cli-1.0.0-into_values.patch')
-rw-r--r--games-rpg/rpg-cli/files/rpg-cli-1.0.0-into_values.patch21
1 files changed, 0 insertions, 21 deletions
diff --git a/games-rpg/rpg-cli/files/rpg-cli-1.0.0-into_values.patch b/games-rpg/rpg-cli/files/rpg-cli-1.0.0-into_values.patch
deleted file mode 100644
index 9130df5c42be..000000000000
--- a/games-rpg/rpg-cli/files/rpg-cli-1.0.0-into_values.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix build with <rust-1.54
-
-error[E0658]: use of unstable library feature 'map_into_keys_values'
- --> src/item/chest.rs:111:51
- |
-111 | let mut items: Vec<Box<dyn Item>> = items.into_values().flatten().collect();
- | ^^^^^^^^^^^
- |
- = note: see issue #75294 <https://github.com/rust-lang/rust/issues/75294> for more information
-
---- a/src/item/chest.rs
-+++ b/src/item/chest.rs
-@@ -108,7 +108,7 @@ impl Chest {
- /// Remove the gold, items and equipment from a hero and return them as a new chest.
- pub fn drop(game: &mut game::Game) -> Self {
- let items: HashMap<Key, Vec<Box<dyn Item>>> = game.inventory.drain().collect();
-- let mut items: Vec<Box<dyn Item>> = items.into_values().flatten().collect();
-+ let mut items: Vec<Box<dyn Item>> = items.into_iter().map(|(_, v)| v).flatten().collect();
- let sword = game.player.sword.take();
- let shield = game.player.shield.take();
-