File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ This changelog tracks the Rust `svdtools` project. See
16
16
* Refactor ` RegisterBlockExt ` , use ` BlockPath ` for better errors
17
17
* Allow specs started with ` _ `
18
18
* Allow process, ` _delete ` and ` _modify ` cluster without ` _clusters ` specifier
19
+ * Allow 1 string ` _include `
19
20
20
21
## [ v0.3.11] 2024-03-06
21
22
Original file line number Diff line number Diff line change @@ -162,9 +162,12 @@ pub fn yaml_includes(parent: &mut Hash) -> Result<Vec<PathBuf>> {
162
162
}
163
163
}
164
164
165
- let inc = parent. get_vec ( "_include" ) ?. unwrap_or ( & Vec :: new ( ) ) . clone ( ) ;
165
+ let inc = parent
166
+ . str_vec_iter ( "_include" ) ?
167
+ . map ( |s| s. to_string ( ) )
168
+ . collect :: < Vec < _ > > ( ) ;
166
169
for relpath in inc {
167
- let relpath = relpath. as_str ( ) . unwrap ( ) ;
170
+ let relpath = relpath. as_str ( ) ;
168
171
let path = abspath ( & self_path, Path :: new ( relpath) )
169
172
. with_context ( || anyhow ! ( "Opening file \" {relpath}\" from file {self_path:?}" ) ) ?;
170
173
if included. contains ( & path) {
You can’t perform that action at this time.
0 commit comments