File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ This changelog tracks the Rust `svdtools` project. See
55
66## [ Unreleased]
77
8+ * Sugar for simple ` _split ` and ` _merge `
9+
810## [ v0.3.18] 2024-08-10
911
1012* Replace ` yaml-rust ` with ` yaml-rust2 ` . Check for duplicate keys and other YAML parse errors
Original file line number Diff line number Diff line change @@ -255,7 +255,6 @@ _rebase:
255255 ARRAY* :
256256 name : NEW_NAME%s
257257 _modify :
258- FIELD : [MINIMUM, MAXIMUM]
259258 FIELD :
260259 description : NEWDESC
261260 OTHER_ARRAY* : {}
Original file line number Diff line number Diff line change @@ -203,6 +203,10 @@ impl RegisterExt for Register {
203203 . with_context ( || format ! ( "Merging fields matched to `{fspec}`" ) ) ?;
204204 }
205205 }
206+ Some ( Yaml :: String ( fspec) ) => {
207+ self . merge_fields ( fspec, None , & rpath)
208+ . with_context ( || format ! ( "Merging fields matched to `{fspec}`" ) ) ?;
209+ }
206210 _ => { }
207211 }
208212
@@ -222,6 +226,10 @@ impl RegisterExt for Register {
222226 . with_context ( || format ! ( "Splitting fields matched to `{fspec}`" ) ) ?;
223227 }
224228 }
229+ Some ( Yaml :: String ( fspec) ) => {
230+ self . split_fields ( fspec, & Hash :: new ( ) , & rpath)
231+ . with_context ( || format ! ( "Splitting fields matched to `{fspec}`" ) ) ?;
232+ }
225233 _ => { }
226234 }
227235
You can’t perform that action at this time.
0 commit comments