Skip to content

Replace as with try_from #61

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.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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