lang: Handle underscores when parsing array sizes (#656)
This commit is contained in:
parent
b6720be3ce
commit
afa218f797
|
@ -159,7 +159,12 @@ impl std::str::FromStr for IdlType {
|
|||
let inner = &inner[..inner.len() - 1];
|
||||
let mut parts = inner.split(';');
|
||||
let ty = IdlType::from_str(parts.next().unwrap()).unwrap();
|
||||
let len = parts.next().unwrap().parse::<usize>().unwrap();
|
||||
let len = parts
|
||||
.next()
|
||||
.unwrap()
|
||||
.replace("_", "")
|
||||
.parse::<usize>()
|
||||
.unwrap();
|
||||
assert!(parts.next().is_none());
|
||||
IdlType::Array(Box::new(ty), len)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue