diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-09-16 22:05:01 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-09-16 22:05:01 +0100 |
commit | cc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch) | |
tree | 125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /games-rpg/rpg-cli/files | |
parent | 677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff) |
gentoo resync : 16.09.2021
Diffstat (limited to 'games-rpg/rpg-cli/files')
-rw-r--r-- | games-rpg/rpg-cli/files/rpg-cli-1.0.0-clap.patch | 20 | ||||
-rw-r--r-- | games-rpg/rpg-cli/files/rpg-cli-1.0.0-into_values.patch | 21 |
2 files changed, 41 insertions, 0 deletions
diff --git a/games-rpg/rpg-cli/files/rpg-cli-1.0.0-clap.patch b/games-rpg/rpg-cli/files/rpg-cli-1.0.0-clap.patch new file mode 100644 index 000000000000..780ff8b40e8a --- /dev/null +++ b/games-rpg/rpg-cli/files/rpg-cli-1.0.0-clap.patch @@ -0,0 +1,20 @@ +Fix build + +error[E0658]: arbitrary expressions in key-value attributes are unstable + --> /mnt/portagetmp/portage/games-rpg/rpg-cli-1.0.0/work/cargo_home/gentoo/clap-3.0.0-beta.4/src/lib.rs:8:10 + | +8 | #![doc = include_str!("../README.md")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information + +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -5,7 +5,6 @@ + + #![doc(html_logo_url = "https://clap.rs/images/media/clap.png")] + #![doc(html_root_url = "https://docs.rs/clap/3.0.0-beta.4")] +-#![doc = include_str!("../README.md")] + //! <https://github.com/clap-rs/clap> + #![crate_type = "lib"] + #![deny( 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 new file mode 100644 index 000000000000..9130df5c42be --- /dev/null +++ b/games-rpg/rpg-cli/files/rpg-cli-1.0.0-into_values.patch @@ -0,0 +1,21 @@ +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(); + |