| Crates.io | is_in |
| lib.rs | is_in |
| version | 1.0.0 |
| created_at | 2021-11-16 17:46:26.399002+00 |
| updated_at | 2021-12-24 19:43:12.855191+00 |
| description | A nicer way to check if a value is in an array. |
| homepage | https://github.com/notronaldmcdonald/is_in |
| repository | https://github.com/notronaldmcdonald/is_in |
| max_upload_size | |
| id | 482892 |
| size | 7,848 |
A small Rust library to provide a nicer way to check if something is in a slice.
Add to your Cargo.toml:
[dependencies]
is_in = "0.1"
use is_in::IsIn;
let slice1: [u8; 3] = [0, 3, 2];
println!("{}", 2_u8.is_in(&slice1)); // Prints "true".