Skip to content

Commit 6bf6968

Browse files
bors[bot]burrbull
andauthored
Merge #147
147: allow single valued dimIndex r=therealprof a=burrbull As proposed by @ coherent-lyn Closes #108 Co-authored-by: Andrey Zgarbul <[email protected]>
2 parents 599f4a2 + 2e12432 commit 6bf6968

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
- Allow single valued `dimIndex`
1011
- Added `reg_iter`, `reg_iter_mut` methods on `Peripheral` and `Cluster`
1112
- Added `DerefMut` for `Cluster`, `Register` and `Field`
1213
- Added `display_name` to `RegisterInfo`

src/types.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,8 @@ impl Parse for DimIndex {
115115
let end = unwrap!(unwrap!(parts.next()).parse::<u32>()) + 1;
116116

117117
Ok((start..end).map(|i| i.to_string()).collect())
118-
} else if text.contains(',') {
119-
Ok(text.split(',').map(|s| s.to_string()).collect())
120118
} else {
121-
unreachable!()
119+
Ok(text.split(',').map(|s| s.to_string()).collect())
122120
}
123121
}
124122
}

0 commit comments

Comments
 (0)