Skip to content

Implement Rand for std::num::Wrapping #168

Description

@Darksonn

Currently we can't do:

let vec: Vec<Wrapping<i32>> = rng.gen_iter().take(100).collect();

instead we have to do this:

let vec: Vec<Wrapping<i32>> = rng.gen_iter::<i32>().map(|i| Wrapping(i)).take(100).collect();

I think it would be a good idea to implement Rand for the Wrapping type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyParticipation: easy jobF-new-intFunctionality: new, within Rand

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions