Skip to content

Replace unwrap() to something else. #9

@gesidler

Description

@gesidler

let iso_obj: Value = serde_json::from_str(&iso_data).unwrap();

Hi.
As I see, there are a lot of unwrap() methods all around the code. For example above. These calls will panic in case of Err results of unwrapped operations. If this behaviour isn't intended I suggest to use something like unwrap_or(), ok_or() or something else of option API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions