assert_into 1.1.0

For when writing .try_into().unwrap() feels too long
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 13.98 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 482.38 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • voysys/assert_into
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JoNil

assert_into

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