Skip to content

Don't panic on From i32 #51

@rusty-snake

Description

@rusty-snake

Previous discussed in #41 but closed w/o result.

https://doc.rust-lang.org/std/convert/trait.From.html says:

Note: This trait must not fail. The From trait is intended for perfect conversions. If the conversion can fail or is not perfect, use TryFrom.

[…] the general expectation is that the conversions should typically be restricted as follows:

  • The conversion is infallible: if the conversion can fail, use TryFrom instead; don’t provide a From impl that panics.

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