Enable 128-bit impls unconditionally
This commit is contained in:
parent
63d5944d90
commit
e970e7117f
|
@ -19,13 +19,12 @@ jobs:
|
|||
with:
|
||||
toolchain: ${{matrix.rust}}
|
||||
- run: cargo build
|
||||
- run: cargo build --features i128
|
||||
- run: cargo test --features i128
|
||||
- run: cargo test --features i128 --release
|
||||
- run: cargo build --no-default-features --features i128
|
||||
- run: cargo test --tests --no-default-features --features i128
|
||||
- run: cargo test --tests --no-default-features --features i128 --release
|
||||
- run: cargo bench --no-run --features i128
|
||||
- run: cargo test
|
||||
- run: cargo test --release
|
||||
- run: cargo build --no-default-features
|
||||
- run: cargo test --tests --no-default-features
|
||||
- run: cargo test --tests --no-default-features --release
|
||||
- run: cargo bench --no-run
|
||||
if: matrix.rust == 'nightly'
|
||||
|
||||
miri:
|
||||
|
|
|
@ -14,7 +14,6 @@ edition = "2018"
|
|||
|
||||
[features]
|
||||
default = ["std"]
|
||||
i128 = []
|
||||
std = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
|
|
|
@ -72,8 +72,7 @@ fn fmt<W: fmt::Write, V: itoa::Integer>(writer: W, value: V) -> fmt::Result;
|
|||
```
|
||||
|
||||
where `itoa::Integer` is implemented for i8, u8, i16, u16, i32, u32, i64, u64,
|
||||
i128, u128, isize and usize. 128-bit integer support requires rustc 1.26+ and
|
||||
the `i128` feature of this crate enabled.
|
||||
i128, u128, isize and usize.
|
||||
|
||||
The `write` function is only available when the `std` feature is enabled
|
||||
(default is enabled). The return value gives the number of bytes written.
|
||||
|
|
|
@ -76,8 +76,6 @@ benches! {
|
|||
bench_i16_0(0i16),
|
||||
bench_i16_min(<i16>::min_value()),
|
||||
|
||||
#[cfg(feature = "i128")]
|
||||
bench_u128_0(0u128),
|
||||
#[cfg(feature = "i128")]
|
||||
bench_u128_max(<u128>::max_value())
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
clippy::unreadable_literal
|
||||
)]
|
||||
|
||||
#[cfg(feature = "i128")]
|
||||
mod udiv128;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
|
@ -289,7 +288,6 @@ impl_Integer!(I32_MAX_LEN => isize, U32_MAX_LEN => usize as u32);
|
|||
#[cfg(target_pointer_width = "64")]
|
||||
impl_Integer!(I64_MAX_LEN => isize, U64_MAX_LEN => usize as u64);
|
||||
|
||||
#[cfg(all(feature = "i128"))]
|
||||
macro_rules! impl_Integer128 {
|
||||
($($max_len:expr => $t:ident),*) => {$(
|
||||
impl_IntegerCommon!($max_len, $t);
|
||||
|
@ -351,9 +349,7 @@ macro_rules! impl_Integer128 {
|
|||
)*};
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "i128"))]
|
||||
const U128_MAX_LEN: usize = 39;
|
||||
const I128_MAX_LEN: usize = 40;
|
||||
|
||||
#[cfg(all(feature = "i128"))]
|
||||
impl_Integer128!(I128_MAX_LEN => i128, U128_MAX_LEN => u128);
|
||||
|
|
|
@ -38,10 +38,7 @@ test! {
|
|||
test_i16_0(0i16, "0"),
|
||||
test_i16_min(<i16>::min_value(), "-32768"),
|
||||
|
||||
#[cfg(feature = "i128")]
|
||||
test_u128_0(0u128, "0"),
|
||||
#[cfg(feature = "i128")]
|
||||
test_u128_max(<u128>::max_value(), "340282366920938463463374607431768211455"),
|
||||
#[cfg(feature = "i128")]
|
||||
test_i128_min(<i128>::min_value(), "-170141183460469231731687303715884105728")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue