Skip to content

sdf parsing should be consistent with integer parsing #537

Description

@midnightveil

We have an sdf_parse_number function that sanely handles an error, but a bunch of the code only does:

                    let id = checked_lookup(xml_sdf, &child, "id")?
                        .parse::<i64>()
                        .unwrap();

Which does:

thread 'main' (2402178) panicked at tool/microkit/src/sdf.rs:973:30:
called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit 

Which looks ugly.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions