We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 118cc58 + 518d0df commit 3930839Copy full SHA for 3930839
CHANGELOG-rust.md
@@ -5,6 +5,8 @@ This changelog tracks the Rust `svdtools` project. See
5
6
## [Unreleased]
7
8
+* If there is no path to interpolate, show unmodified `description`.
9
+
10
## [v0.3.13] 2024-03-29
11
12
* Interpolate path and name in `description` and `derivedFrom`
src/patch/mod.rs
@@ -804,7 +804,11 @@ impl Spec for str {
804
}
805
806
fn opt_interpolate<T: Interpolate>(path: &Option<&T>, s: Option<&str>) -> Option<String> {
807
- path.and_then(|path| path.interpolate_opt(s))
+ if let Some(path) = path {
808
+ path.interpolate_opt(s)
809
+ } else {
810
+ s.map(ToString::to_string)
811
+ }
812
813
814
trait Interpolate {
0 commit comments