Skip to content

Commit deb3fb8

Browse files
committed
fix: replace %S to %s in encode's change_case
1 parent 46aaf18 commit deb3fb8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

svd-encoder/src/config.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ pub fn change_case(s: &str, case: Option<IdentifierFormat>) -> String {
5151
Boundary::Acronym,
5252
];
5353

54-
s.with_boundaries(&boundary).to_case(match case {
55-
IdentifierFormat::Camel => Case::Camel,
56-
IdentifierFormat::Pascal => Case::Pascal,
57-
IdentifierFormat::Snake => Case::Snake,
58-
IdentifierFormat::Constant => Case::UpperSnake,
59-
})
54+
s.with_boundaries(&boundary)
55+
.to_case(match case {
56+
IdentifierFormat::Camel => Case::Camel,
57+
IdentifierFormat::Pascal => Case::Pascal,
58+
IdentifierFormat::Snake => Case::Snake,
59+
IdentifierFormat::Constant => Case::UpperSnake,
60+
})
61+
.replace("%S", "%s")
6062
}
6163
}
6264
}

0 commit comments

Comments
 (0)