File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed
Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,6 @@ ryu = "1.0.17"
1717
1818[dev-dependencies ]
1919paste = " 1"
20+
21+ [features ]
22+ nonzero_impls = []
Original file line number Diff line number Diff line change @@ -4,4 +4,6 @@ A no-std version of ToString implemented for bool/integer/float types formatting
44
55## Minimum Supported Rust Version
66
7- This is currently 1.56, and is considered a breaking update to increase.
7+ This is currently 1.56 with no features active, and is considered a breaking update to increase.
8+
9+ - Using the ` nonzero_impls ` feature, this increases to 1.79.
Original file line number Diff line number Diff line change 33//! ## Minimum Supported Rust Version
44//!
55//! This is currently 1.56, and is considered a breaking update to increase.
6+ //!
7+ //! - Using the `nonzero_impls` feature, this increases to 1.79.
68
79#![ no_std]
810#![ warn( clippy:: pedantic) ]
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ macro_rules! impl_int {
2424 }
2525 }
2626
27+ #[ cfg( feature = "nonzero_impls" ) ]
2728 impl ToArrayString for core:: num:: NonZero <$type> {
2829 const MAX_LENGTH : usize = $len;
2930 type ArrayString = ArrayString <$len>;
@@ -56,6 +57,8 @@ macro_rules! generate_test {
5657 #[ test]
5758 fn [ <check_ $type>] ( ) {
5859 test_impl( $type:: MIN , $type:: MAX ) ;
60+
61+ #[ cfg( feature = "nonzero_impls" ) ]
5962 test_impl( core:: num:: NonZero :: <$type>:: MIN , core:: num:: NonZero :: <$type>:: MAX ) ;
6063 }
6164 ) * ) ;
You can’t perform that action at this time.
0 commit comments