| Crates.io | assert_into |
| lib.rs | assert_into |
| version | 1.1.0 |
| created_at | 2020-10-01 13:45:06.136484+00 |
| updated_at | 2020-10-22 12:19:07.579385+00 |
| description | For when writing .try_into().unwrap() feels too long |
| homepage | |
| repository | https://github.com/voysys/assert_into |
| max_upload_size | |
| id | 295027 |
| size | 14,506 |
For when writing .try_into().unwrap() feels too long.
use assert_into::AssertInto;
fn main() {
let a: u32 = (-1i32).assert_into();
}
Gives you: thread 'main' panicked at '-1 is out of range for type u32: TryFromIntError(())', src\main.rs:4:26