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

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions