@@ -92,21 +92,19 @@ impl Parse for BitRange {
92
92
} else if let ( Some ( offset) , Some ( width) ) =
93
93
( tree. get_child ( "bitOffset" ) , tree. get_child ( "bitWidth" ) )
94
94
{
95
- (
96
- // Special case because offset and width are directly provided
97
- // (ie. do not need to be calculated as in the final step)
98
- return Ok ( BitRange {
99
- // TODO: capture that error comes from offset/width tag
100
- // TODO: `u32::parse` should not hide it's errors
101
- offset : u32:: parse ( offset) . with_context ( || {
102
- SVDError :: InvalidBitRange ( tree. clone ( ) , InvalidBitRange :: ParseError )
103
- } ) ?,
104
- width : u32:: parse ( width) . with_context ( || {
105
- SVDError :: InvalidBitRange ( tree. clone ( ) , InvalidBitRange :: ParseError )
106
- } ) ?,
107
- range_type : BitRangeType :: OffsetWidth ,
108
- } )
109
- )
95
+ // Special case because offset and width are directly provided
96
+ // (ie. do not need to be calculated as in the final step)
97
+ return Ok ( BitRange {
98
+ // TODO: capture that error comes from offset/width tag
99
+ // TODO: `u32::parse` should not hide it's errors
100
+ offset : u32:: parse ( offset) . with_context ( || {
101
+ SVDError :: InvalidBitRange ( tree. clone ( ) , InvalidBitRange :: ParseError )
102
+ } ) ?,
103
+ width : u32:: parse ( width) . with_context ( || {
104
+ SVDError :: InvalidBitRange ( tree. clone ( ) , InvalidBitRange :: ParseError )
105
+ } ) ?,
106
+ range_type : BitRangeType :: OffsetWidth ,
107
+ } ) ;
110
108
} else {
111
109
return Err ( SVDError :: InvalidBitRange ( tree. clone ( ) , InvalidBitRange :: Syntax ) . into ( ) ) ;
112
110
} ;
0 commit comments