Skip to content

Replace as with try_from #61

@billyb2

Description

@billyb2

as has the wonderful side effect of only taking lower bits of a conversion when type casting, which means that if the value is too large, it can have some very nasty side effects. TryFrom, meanwhile, does what I want it to (return a Result type that can be dealt with properly, probably by crashing the program for now lol.)

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