From 7d8cbca880e24d2632bf69168b243222c57c97c8 Mon Sep 17 00:00:00 2001 From: Andrey Zgarbul Date: Wed, 3 Jan 2024 11:01:08 +0300 Subject: [PATCH] unwrap -> expect --- svd-parser/src/expand.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/svd-parser/src/expand.rs b/svd-parser/src/expand.rs index 1f400c0..e8acc7a 100644 --- a/svd-parser/src/expand.rs +++ b/svd-parser/src/expand.rs @@ -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 };