Once the MSRV is raised above 1.79, we can replace the current implementation with one generic impl for `NonZero<T>`.