nzliteral 1.0.0

Macro simplifying use of NonZero literals.
Documentation

nzliteral

The NonZero<T> types are really useful for defining variables that cannot be zero. The one annoying issue I keep running into is creating values from literals that I know cannot be 0, and still having to unwrap() or expect() to get the resulting NonZero<T> value.

This crate provides the nzliteral macro that fails to compile if it is supplied a 0. If called with a non-zero literal, the macro creates the NonZero<T> value and automatically unwrap()s it.