Skip to content

Converting to usize/isize? #47

@tobiasvl

Description

@tobiasvl

I'm not a Rust veteran, but is there a (fixable) reason why the ux types can't be converted directly to usize/isize?

let x = usize::from(u4::new(0)); // the trait bound `usize: std::convert::From<ux::u4>` is not satisfied
let x = usize::from(u8::from(u4::new(0))); // works, but is obviously not ergonomical

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions