From 1278cec784c4f52bc58a5f52f7ced01c6018f954 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 10 Feb 2025 09:30:50 +0100 Subject: [PATCH] add percent sign to blacklisted characters --- CHANGELOG.md | 1 + src/util.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6604f511..084d84d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). - Some fixes for the `svd2rust-regress` tool and update of its documentation - Other internal clippy fixes for `clippy::manual_div_ceil`, `clippy::nonminimal_bool` and `clippy::needless_lifetimes` +- Added '%' to the blacklisted characters which are removed from names for ident conversion ## [v0.35.0] - 2024-11-12 diff --git a/src/util.rs b/src/util.rs index dbf0dde5..9e0a5082 100644 --- a/src/util.rs +++ b/src/util.rs @@ -21,7 +21,7 @@ pub const BITS_PER_BYTE: u32 = 8; /// List of chars that some vendors use in their peripheral/field names but /// that are not valid in Rust ident -const BLACKLIST_CHARS: &[char] = &['(', ')', '[', ']', '/', ' ', '-']; +const BLACKLIST_CHARS: &[char] = &['(', ')', '[', ']', '/', ' ', '-', '%']; fn to_pascal_case(s: &str) -> String { if !s.contains('_') {