Skip to content

Commit 181b1f9

Browse files
committed
camelCase for WriteConstraint serialization
1 parent 8bfae9c commit 181b1f9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

svd-rs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
## Unreleased
99

1010
- merge `register` with `registerinfo` modules same as other `info`s
11+
- camelCase for WriteConstraint serialization
1112
- `EnumeratedValues.usage()` now return `None` if it is derived, fix bug in usage check
1213
- Use generic `SingleArray` enum for types which can be either collected into SVD arrays or have only one instance
1314
- `Name` trait for structures that has `name` field

svd-rs/src/writeconstraint.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
/// Define constraints for writing values to a field
2-
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
2+
#[cfg_attr(
3+
feature = "serde",
4+
derive(serde::Deserialize, serde::Serialize),
5+
serde(rename_all = "camelCase")
6+
)]
37
#[derive(Clone, Copy, Debug, PartialEq)]
48
pub enum WriteConstraint {
59
/// If `true`, only the last read value can be written.

0 commit comments

Comments
 (0)