#pick #array #random #element

pick-one

Picks one random element from an array

2 stable releases

Uses old Rust 2015

1.0.1 Oct 1, 2016

#23 in #pick

46 downloads per month
Used in 5 crates

MIT license

2KB

rust-pick-one

Picks one random element from an array

Usage

In Cargo.toml:

[dependencies]
pick-one = "1.0.1"

In your lib.rs or main.rs:

extern crate pick_one;

let random_choice = pick_one::pick_one_str(&["doggo"]);

Dependencies

~330–560KB