Skip to content

Commit

Permalink
unwrap -> expect
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Jan 3, 2024
1 parent c5e5aea commit 7d8cbca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion svd-parser/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ impl FieldPath {
let name = v.pop().unwrap();
let register = if !v.is_empty() {
let (block, rname) = RegisterPath::parse_vec(v);
Some(RegisterPath::new(block.unwrap(), rname))
Some(RegisterPath::new(
block.expect(&format!(
"Full qualifying field path is expected. Passed: {v:?}"
)),
rname,
))
} else {
None
};
Expand Down

0 comments on commit 7d8cbca

Please sign in to comment.