From 49e381a959e4573b0856608576a5e81ce9ee1184 Mon Sep 17 00:00:00 2001 From: PG Herveou <pgherveou@gmail.com> Date: Fri, 7 Feb 2025 22:08:31 +0100 Subject: [PATCH] Fix compilation warnings (#7507) This should fix some compilation warnings discovered under rustc 1.83 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- prdoc/pr_7507.prdoc | 9 +++++++++ substrate/frame/examples/view-functions/Cargo.toml | 2 +- substrate/primitives/consensus/beefy/src/payload.rs | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 prdoc/pr_7507.prdoc diff --git a/prdoc/pr_7507.prdoc b/prdoc/pr_7507.prdoc new file mode 100644 index 00000000000..7f553298b0a --- /dev/null +++ b/prdoc/pr_7507.prdoc @@ -0,0 +1,9 @@ +title: 'Fix compilation warnings ' +doc: +- audience: Runtime Dev + description: This should fix some compilation warnings discovered under rustc 1.83 +crates: +- name: pallet-example-view-functions + bump: minor +- name: sp-consensus-beefy + bump: minor diff --git a/substrate/frame/examples/view-functions/Cargo.toml b/substrate/frame/examples/view-functions/Cargo.toml index b52ad4e06e9..b159357581d 100644 --- a/substrate/frame/examples/view-functions/Cargo.toml +++ b/substrate/frame/examples/view-functions/Cargo.toml @@ -15,7 +15,7 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", default-features = false, workspace = true } +codec = { default-features = false, workspace = true } frame-metadata = { features = ["current"], workspace = true } log = { workspace = true } scale-info = { default-features = false, features = ["derive"], workspace = true } diff --git a/substrate/primitives/consensus/beefy/src/payload.rs b/substrate/primitives/consensus/beefy/src/payload.rs index 9e792670fef..2bc96548bdf 100644 --- a/substrate/primitives/consensus/beefy/src/payload.rs +++ b/substrate/primitives/consensus/beefy/src/payload.rs @@ -60,7 +60,7 @@ impl Payload { pub fn get_all_raw<'a>( &'a self, id: &'a BeefyPayloadId, - ) -> impl Iterator<Item = &Vec<u8>> + 'a { + ) -> impl Iterator<Item = &'a Vec<u8>> + 'a { self.0 .iter() .filter_map(move |probe| if &probe.0 != id { return None } else { Some(&probe.1) }) -- GitLab