Skip to content

Deprecated Examples in Generate Random Values #728

Open
@fEst1ck

Description

@fEst1ck

A few examples in chapter "Generate Random Values" using rand is deprecated.

let n1: u8 = rng.gen();

The method is renamed to random; similar for gen_range, which is renamed to random_range.

See https://docs.rs/rand/latest/rand/trait.Rng.html#method.gen.

I've not contributed to this project, but this seems an easy fix and I could open an PR to fix this if wanted :)

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