File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ This changelog tracks the Rust `svdtools` project. See
66## [ Unreleased]
77
88* Interpolate path and name in ` description ` and ` derivedFrom `
9+ * Allow specs started with ` _ ` (missing part)
910
1011## [ v0.3.12] 2024-03-23
1112
Original file line number Diff line number Diff line change @@ -259,9 +259,6 @@ fn newglob(spec: &str) -> globset::GlobMatcher {
259259
260260/// If a name matches a specification, return the first sub-specification that it matches
261261fn matchsubspec < ' a > ( name : & str , spec : & ' a str ) -> Option < & ' a str > {
262- if spec. starts_with ( '_' ) {
263- return None ;
264- }
265262 if spec. contains ( '{' ) {
266263 let glob = newglob ( spec) ;
267264 if glob. is_match ( name) {
@@ -731,9 +728,7 @@ fn spec_ind(spec: &str) -> Option<(usize, usize)> {
731728 Regex :: new ( r"^[\w%]*((?:[\?*]|\[\d+(?:-\d+)?\]|\[[a-zA-Z]+(?:-[a-zA-Z]+)?\])+)[\w%]*$" )
732729 . unwrap ( )
733730 } ) ;
734- let Some ( caps) = RE . captures ( spec) else {
735- return None ;
736- } ;
731+ let caps = RE . captures ( spec) ?;
737732 let spec = caps. get ( 0 ) . unwrap ( ) ;
738733 let token = caps. get ( 1 ) . unwrap ( ) ;
739734 let li = token. start ( ) ;
You can’t perform that action at this time.
0 commit comments