diff --git a/CHANGELOG.md b/CHANGELOG.md index ceff291e..1f9fd43e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +## [v0.34.1] - 2024-11-12 + - Add `crate_path` setting - Inline `Settings` into `Config`, add `settings_file` - Fix MSP430 PAC inner attribute generation when used with the `-m` switch. @@ -928,7 +930,8 @@ peripheral.register.write(|w| w.field().set()); - Initial version of the `svd2rust` tool -[Unreleased]: https://github.com/rust-embedded/svd2rust/compare/v0.34.0...HEAD +[Unreleased]: https://github.com/rust-embedded/svd2rust/compare/v0.34.1...HEAD +[v0.34.1]: https://github.com/rust-embedded/svd2rust/compare/v0.34.0...v0.34.1 [v0.34.0]: https://github.com/rust-embedded/svd2rust/compare/v0.33.5...v0.34.0 [v0.33.5]: https://github.com/rust-embedded/svd2rust/compare/v0.33.4...v0.33.5 [v0.33.4]: https://github.com/rust-embedded/svd2rust/compare/v0.33.3...v0.33.4 diff --git a/Cargo.lock b/Cargo.lock index f235d118..bd83e725 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1207,7 +1207,7 @@ dependencies = [ [[package]] name = "svd2rust" -version = "0.34.0" +version = "0.34.1" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 1d3e1a93..24b8992e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ keywords = ["svd", "embedded", "register", "map", "generator"] license = "MIT OR Apache-2.0" name = "svd2rust" repository = "https://github.com/rust-embedded/svd2rust/" -version = "0.34.0" +version = "0.34.1" readme = "README.md" rust-version = "1.74" diff --git a/src/config.rs b/src/config.rs index dc4d0803..ca6ced37 100644 --- a/src/config.rs +++ b/src/config.rs @@ -375,7 +375,7 @@ impl<'de> serde::Deserialize<'de> for CratePath { impl FromStr for CratePath { type Err = syn::Error; fn from_str(s: &str) -> std::result::Result { - syn::parse_str(&s).map(Self) + syn::parse_str(s).map(Self) } } diff --git a/src/generate/register.rs b/src/generate/register.rs index f5abfa65..92322ebe 100644 --- a/src/generate/register.rs +++ b/src/generate/register.rs @@ -259,7 +259,7 @@ pub fn render_register_mod( rsize.next_power_of_two() }; let rty = rsize.to_ty()?; - let description = util::respace(®ister.description.as_deref().unwrap_or_else(|| { + let description = util::respace(register.description.as_deref().unwrap_or_else(|| { warn!("Missing description for register {rname}"); "" })); diff --git a/src/util.rs b/src/util.rs index b1d7ee45..5c56f3c3 100644 --- a/src/util.rs +++ b/src/util.rs @@ -180,7 +180,7 @@ pub fn escape_brackets(s: &str) -> String { /// Escape basic html tags and brackets pub fn escape_special_chars(s: &str) -> Cow<'_, str> { if s.contains('[') { - escape_brackets(&s).into() + escape_brackets(s).into() } else { s.into() }