9 releases (2 stable)

Uses new Rust 2024

1.0.1 Sep 22, 2025
1.0.0 Sep 1, 2025
0.1.6 Jul 3, 2025
0.1.5 Jun 27, 2025

#314 in Hardware support

Download history 37/week @ 2025-08-13 200/week @ 2025-08-20 252/week @ 2025-08-27 234/week @ 2025-09-03 182/week @ 2025-09-10 349/week @ 2025-09-17 147/week @ 2025-09-24 251/week @ 2025-10-01 259/week @ 2025-10-08 241/week @ 2025-10-15 281/week @ 2025-10-22 210/week @ 2025-10-29 305/week @ 2025-11-05 303/week @ 2025-11-12 467/week @ 2025-11-19 287/week @ 2025-11-26

1,408 downloads per month
Used in 11 crates (8 directly)

MIT license

14KB
123 lines

Utilizing for working with non-zero integers.

Currently this implements a shorthand macro for creating non-zero integers from expressions at compile time:

use std::num::NonZero;

use new_zealand::nz;

fn foo(x: NonZero<u32>) {
    println!("NonZero value: {x}");
}

foo(nz!(42));
foo(nz!(3 * 8));

Utilities for working with non-zero integers.

Currently this implements a shorthand macro for creating non-zero integers from literals at compile time:

use std::num::NonZero;
use new_zealand::nz;

fn foo(x: NonZero<u32>) { println!("NonZero value: {x}"); }

foo(nz!(42));

More details in the package documentation.

This is part of the Folo project that provides mechanisms for high-performance hardware-aware programming in Rust.

No runtime deps