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
1616* Refactor ` RegisterBlockExt ` , use ` BlockPath ` for better errors
1717* Allow specs started with ` _ `
1818* Allow process, ` _delete ` and ` _modify ` cluster without ` _clusters ` specifier
19+ * Allow 1 string ` _include `
1920
2021## [ v0.3.11] 2024-03-06
2122
Original file line number Diff line number Diff line change @@ -162,9 +162,12 @@ pub fn yaml_includes(parent: &mut Hash) -> Result<Vec<PathBuf>> {
162162 }
163163 }
164164
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 < _ > > ( ) ;
166169 for relpath in inc {
167- let relpath = relpath. as_str ( ) . unwrap ( ) ;
170+ let relpath = relpath. as_str ( ) ;
168171 let path = abspath ( & self_path, Path :: new ( relpath) )
169172 . with_context ( || anyhow ! ( "Opening file \" {relpath}\" from file {self_path:?}" ) ) ?;
170173 if included. contains ( & path) {
You can’t perform that action at this time.
0 commit comments