Remove broken panic message
This commit is contained in:
parent
e21faaeb47
commit
f240edc579
1 changed files with 7 additions and 5 deletions
|
@ -447,11 +447,13 @@ pub fn gen(options: Options) {
|
||||||
Some(clock) => clock.as_str(),
|
Some(clock) => clock.as_str(),
|
||||||
None => {
|
None => {
|
||||||
// No clock was specified, derive the clock name from the enable register name.
|
// No clock was specified, derive the clock name from the enable register name.
|
||||||
let re = Regex::new("([A-Z]+\\d*).*").unwrap();
|
Regex::new("([A-Z]+\\d*).*")
|
||||||
let caps = re.captures(enable_reg).expect(
|
.unwrap()
|
||||||
"unable to derive clock name from register name {}",
|
.captures(enable_reg)
|
||||||
);
|
.unwrap()
|
||||||
caps.get(1).unwrap().as_str()
|
.get(1)
|
||||||
|
.unwrap()
|
||||||
|
.as_str()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue