From 82af538721be1b75665079f17825d9d3829c3f74 Mon Sep 17 00:00:00 2001 From: pellico Date: Thu, 5 Dec 2024 08:54:39 +0100 Subject: [PATCH] Fixed issues detected by latest clippy (1.83) Bumped package version to 8.3.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/lib.rs | 1 - src/rust_gen/xml2ir.rs | 2 +- src/rust_gen/xml2ir/svd2temp.rs | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 920d959..13ea1cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -915,7 +915,7 @@ dependencies = [ [[package]] name = "svd2pac" -version = "0.3.0" +version = "0.3.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 948bf0b..0f81fdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "svd2pac" -version = "0.3.0" +version = "0.3.1" edition = "2021" rust-version = "1.74" categories = ["command-line-utilities", "development-tools::ffi"] diff --git a/src/lib.rs b/src/lib.rs index 1222dd9..25773ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -72,7 +72,6 @@ pub struct Args { /// let args = ["", "./test_svd/simple.xml", "./generated_code"]; /// main_parse_arguments(args); /// ``` - pub fn main_parse_arguments(args: I) where I: IntoIterator, diff --git a/src/rust_gen/xml2ir.rs b/src/rust_gen/xml2ir.rs index 0c9b8dc..9cd925e 100644 --- a/src/rust_gen/xml2ir.rs +++ b/src/rust_gen/xml2ir.rs @@ -35,7 +35,7 @@ enum PeripheralClusterE<'a> { Cluster(&'a mut Cluster), } -impl<'a> PeripheralClusterE<'a> { +impl PeripheralClusterE<'_> { pub fn get_mut_registers(&mut self) -> &mut LinkedHashMap>> { match self { PeripheralClusterE::Peripheral(p) => &mut p.registers, diff --git a/src/rust_gen/xml2ir/svd2temp.rs b/src/rust_gen/xml2ir/svd2temp.rs index 8c9e443..0f66c98 100644 --- a/src/rust_gen/xml2ir/svd2temp.rs +++ b/src/rust_gen/xml2ir/svd2temp.rs @@ -27,12 +27,12 @@ pub(super) struct ClusterAbs<'a> { trait AbsoluteAddress { fn abs_address(&self) -> u64; } -impl<'a> AbsoluteAddress for RegisterAbs<'a> { +impl AbsoluteAddress for RegisterAbs<'_> { fn abs_address(&self) -> u64 { self.base_addr + self.register.address_offset as u64 } } -impl<'a> AbsoluteAddress for ClusterAbs<'a> { +impl AbsoluteAddress for ClusterAbs<'_> { fn abs_address(&self) -> u64 { self.base_addr + self.cluster.address_offset as u64 }