Repository: BurntSushi/byteorder (language: rust)

Issue:
changelog: backfill to 1.3.3
Closes #160


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 112246b..2c2c790 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -31,7 +31,7 @@ jobs:
         include:
         - build: pinned
           os: ubuntu-18.04
-          rust: 1.12.0
+          rust: 1.41.1
         - build: stable
           os: ubuntu-18.04
           rust: stable
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 020beb4..6b51eb0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,28 @@
+1.3.4
+=====
+This patch release squashes deprecation warnings for the `try!` macro, in
+accordance with byteorder's minimum supported Rust version (currently at Rust
+1.12.0).
+
+
+1.3.3
+=====
+This patch release adds `ByteOrder::write_i8_into()` as a simple, safe interface
+for ordinarily unsafe or tedious code.
+
+
+1.3.2
+=====
+This patch release adds `ReadBytesExt::read_i8_into()` as a simple, safe interface
+for ordinarily unsafe or tedious code.
+
+
+1.3.1
+=====
+This minor release performs mostly small internal changes. Going forward, these
+are not going to be incorporated into the changelog.
+
+
 1.3.0
 =====
 This new minor release now enables `i128` support automatically on Rust
diff --git a/Cargo.toml b/Cargo.toml
index c890e51..3a47fce 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,19 +7,19 @@ documentation = "https://docs.rs/byteorder"
 homepage = "https://github.com/BurntSushi/byteorder"
 repository = "https://github.com/BurntSushi/byteorder"
 readme = "README.md"
-categories = ["encoding", "parsing"]
+categories = ["encoding", "parsing", "no_std"]
 keywords = ["byte", "endian", "big-endian", "little-endian", "binary"]
 license = "Unlicense OR MIT"
 exclude = ["/ci/*"]
-build = "build.rs"
+edition = "2018"
 
 [lib]
 name = "byteorder"
 bench = false
 
 [dev-dependencies]
-quickcheck = { version = "0.8", default-features = false }
-rand = "0.6"
+quickcheck = { version = "0.9.2", default-features = false }
+rand = "0.7"
 
 [features]
 default = ["std"]
diff --git a/benches/bench.rs b/benches/bench.rs
index 9057df5..bb00422 100644
--- a/benches/bench.rs
+++ b/benches/bench.rs
@@ -1,17 +1,15 @@
 #![feature(test)]
 
-extern crate byteorder;
-extern crate rand;
 extern crate test;
 
 macro_rules! bench_num {
     ($name:ident, $read:ident, $bytes:expr, $data:expr) => {
         mod $name {
-            use super::test::black_box as bb;
-            use super::test::Bencher;
             use byteorder::{
                 BigEndian, ByteOrder, LittleEndian, NativeEndian,
             };
+            use test::black_box as bb;
+            use test::Bencher;
 
             const NITER: usize = 100_000;
 
@@ -49,12 +47,12 @@ macro_rules! bench_num {
     ($ty:ident, $max:ident,
      $read:ident, $write:ident, $size:expr, $data:expr) => {
         mod $ty {
-            use super::test::black_box as bb;
-            use super::test::Bencher;
             use byteorder::{
                 BigEndian, ByteOrder, LittleEndian, NativeEndian,
             };
             use std::$ty;
+            use test::black_box as bb;
+            use test::Bencher;
 
             const NITER: usize = 100_000;
 
@@ -151,7 +149,6 @@ bench_num!(int_6, read_int, 6, [1, 2, 3, 4, 5, 6]);
 bench_num!(int_7, read_int, 7, [1, 2, 3, 4, 5, 6, 7]);
 bench_num!(int_8, read_int, 8, [1, 2, 3, 4, 5, 6, 7, 8]);
 
-#[cfg(byteorder_i128)]
 bench_num!(
     u128,
     MAX,
@@ -160,7 +157,6 @@ bench_num!(
     16,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     i128,
     MAX,
@@ -170,57 +166,41 @@ bench_num!(
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
 );
 
-#[cfg(byteorder_i128)]
 bench_num!(uint128_1, read_uint128, 1, [1]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_2, read_uint128, 2, [1, 2]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_3, read_uint128, 3, [1, 2, 3]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_4, read_uint128, 4, [1, 2, 3, 4]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_5, read_uint128, 5, [1, 2, 3, 4, 5]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_6, read_uint128, 6, [1, 2, 3, 4, 5, 6]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_7, read_uint128, 7, [1, 2, 3, 4, 5, 6, 7]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_8, read_uint128, 8, [1, 2, 3, 4, 5, 6, 7, 8]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_9, read_uint128, 9, [1, 2, 3, 4, 5, 6, 7, 8, 9]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_10, read_uint128, 10, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
-#[cfg(byteorder_i128)]
 bench_num!(uint128_11, read_uint128, 11, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
-#[cfg(byteorder_i128)]
 bench_num!(
     uint128_12,
     read_uint128,
     12,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     uint128_13,
     read_uint128,
     13,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     uint128_14,
     read_uint128,
     14,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     uint128_15,
     read_uint128,
     15,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     uint128_16,
     read_uint128,
@@ -228,57 +208,41 @@ bench_num!(
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
 );
 
-#[cfg(byteorder_i128)]
 bench_num!(int128_1, read_int128, 1, [1]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_2, read_int128, 2, [1, 2]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_3, read_int128, 3, [1, 2, 3]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_4, read_int128, 4, [1, 2, 3, 4]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_5, read_int128, 5, [1, 2, 3, 4, 5]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_6, read_int128, 6, [1, 2, 3, 4, 5, 6]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_7, read_int128, 7, [1, 2, 3, 4, 5, 6, 7]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_8, read_int128, 8, [1, 2, 3, 4, 5, 6, 7, 8]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_9, read_int128, 9, [1, 2, 3, 4, 5, 6, 7, 8, 9]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_10, read_int128, 10, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
-#[cfg(byteorder_i128)]
 bench_num!(int128_11, read_int128, 11, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
-#[cfg(byteorder_i128)]
 bench_num!(
     int128_12,
     read_int128,
     12,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     int128_13,
     read_int128,
     13,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     int128_14,
     read_int128,
     14,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     int128_15,
     read_int128,
     15,
     [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
 );
-#[cfg(byteorder_i128)]
 bench_num!(
     int128_16,
     read_int128,
diff --git a/build.rs b/build.rs
deleted file mode 100644
index eb4a438..0000000
--- a/build.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-// For the 'try!' macro, until we bump MSRV past 1.12.
-#![allow(deprecated)]
-
-use std::env;
-use std::ffi::OsString;
-use std::io::{self, Write};
-use std::process::Command;
-
-fn main() {
-    let version = match Version::read() {
-        Ok(version) => version,
-        Err(err) => {
-            writeln!(
-                &mut io::stderr(),
-                "failed to parse `rustc --version`: {}",
-                err
-            )
-            .unwrap();
-            return;
-        }
-    };
-    enable_i128(version);
-}
-
-fn enable_i128(version: Version) {
-    if version < (Version { major: 1, minor: 26, patch: 0 }) {
-        return;
-    }
-
-    println!("cargo:rustc-cfg=byteorder_i128");
-}
-
-#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord)]
-struct Version {
-    major: u32,
-    minor: u32,
-    patch: u32,
-}
-
-impl Version {
-    fn read() -> Result<Version, String> {
-        let rustc = env::var_os("RUSTC").unwrap_or(OsString::from("rustc"));
-        let output =
-            Command::new(&rustc).arg("--version").output().unwrap().stdout;
-        Version::parse(&String::from_utf8(output).unwrap())
-    }
-
-    fn parse(mut s: &str) -> Result<Version, String> {
-        if !s.starts_with("rustc ") {
-            return Err(format!("unrecognized version string: {}", s));
-        }
-        s = &s["rustc ".len()..];
-
-        let parts: Vec<&str> = s.split(".").collect();
-        if parts.len() < 3 {
-            return Err(format!("not enough version parts: {:?}", parts));
-        }
-
-        let mut num = String::new();
-        for c in parts[0].chars() {
-            if !c.is_digit(10) {
-                break;
-            }
-            num.push(c);
-        }
-        let major = try!(num.parse::<u32>().map_err(|e| e.to_string()));
-
-        num.clear();
-        for c in parts[1].chars() {
-            if !c.is_digit(10) {
-                break;
-            }
-            num.push(c);
-        }
-        let minor = try!(num.parse::<u32>().map_err(|e| e.to_string()));
-
-        num.clear();
-        for c in parts[2].chars() {
-            if !c.is_digit(10) {
-                break;
-            }
-            num.push(c);
-        }
-        let patch = try!(num.parse::<u32>().map_err(|e| e.to_string()));
-
-        Ok(Version { major: major, minor: minor, patch: patch })
-    }
-}
diff --git a/src/io.rs b/src/io.rs
index f0c8cad..ac41ff7 100644
--- a/src/io.rs
+++ b/src/io.rs
@@ -1,7 +1,9 @@
-use std::io::{self, Result};
-use std::slice;
+use std::{
+    io::{self, Result},
+    slice,
+};
 
-use ByteOrder;
+use crate::ByteOrder;
 
 /// Extends [`Read`] with methods for reading numbers. (For `std::io`.)
 ///
@@ -52,7 +54,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_u8(&mut self) -> Result<u8> {
         let mut buf = [0; 1];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(buf[0])
     }
 
@@ -82,7 +84,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_i8(&mut self) -> Result<i8> {
         let mut buf = [0; 1];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(buf[0] as i8)
     }
 
@@ -109,7 +111,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_u16<T: ByteOrder>(&mut self) -> Result<u16> {
         let mut buf = [0; 2];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_u16(&buf))
     }
 
@@ -136,7 +138,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_i16<T: ByteOrder>(&mut self) -> Result<i16> {
         let mut buf = [0; 2];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_i16(&buf))
     }
 
@@ -162,7 +164,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_u24<T: ByteOrder>(&mut self) -> Result<u32> {
         let mut buf = [0; 3];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_u24(&buf))
     }
 
@@ -188,7 +190,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_i24<T: ByteOrder>(&mut self) -> Result<i32> {
         let mut buf = [0; 3];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_i24(&buf))
     }
 
@@ -214,7 +216,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_u32<T: ByteOrder>(&mut self) -> Result<u32> {
         let mut buf = [0; 4];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_u32(&buf))
     }
 
@@ -240,7 +242,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_i32<T: ByteOrder>(&mut self) -> Result<i32> {
         let mut buf = [0; 4];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_i32(&buf))
     }
 
@@ -266,7 +268,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_u48<T: ByteOrder>(&mut self) -> Result<u64> {
         let mut buf = [0; 6];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_u48(&buf))
     }
 
@@ -292,7 +294,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_i48<T: ByteOrder>(&mut self) -> Result<i64> {
         let mut buf = [0; 6];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_i48(&buf))
     }
 
@@ -318,7 +320,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_u64<T: ByteOrder>(&mut self) -> Result<u64> {
         let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_u64(&buf))
     }
 
@@ -344,7 +346,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_i64<T: ByteOrder>(&mut self) -> Result<i64> {
         let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_i64(&buf))
     }
 
@@ -370,11 +372,10 @@ pub trait ReadBytesExt: io::Read {
     /// ]);
     /// assert_eq!(16947640962301618749969007319746179, rdr.read_u128::<BigEndian>().unwrap());
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_u128<T: ByteOrder>(&mut self) -> Result<u128> {
         let mut buf = [0; 16];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_u128(&buf))
     }
 
@@ -397,11 +398,10 @@ pub trait ReadBytesExt: io::Read {
     /// let mut rdr = Cursor::new(vec![0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
     /// assert_eq!(i128::min_value(), rdr.read_i128::<BigEndian>().unwrap());
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_i128<T: ByteOrder>(&mut self) -> Result<i128> {
         let mut buf = [0; 16];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_i128(&buf))
     }
 
@@ -426,7 +426,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_uint<T: ByteOrder>(&mut self, nbytes: usize) -> Result<u64> {
         let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf[..nbytes]));
+        self.read_exact(&mut buf[..nbytes])?;
         Ok(T::read_uint(&buf[..nbytes], nbytes))
     }
 
@@ -451,25 +451,23 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_int<T: ByteOrder>(&mut self, nbytes: usize) -> Result<i64> {
         let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf[..nbytes]));
+        self.read_exact(&mut buf[..nbytes])?;
         Ok(T::read_int(&buf[..nbytes], nbytes))
     }
 
     /// Reads an unsigned n-bytes integer from the underlying reader.
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_uint128<T: ByteOrder>(&mut self, nbytes: usize) -> Result<u128> {
         let mut buf = [0; 16];
-        try!(self.read_exact(&mut buf[..nbytes]));
+        self.read_exact(&mut buf[..nbytes])?;
         Ok(T::read_uint128(&buf[..nbytes], nbytes))
     }
 
     /// Reads a signed n-bytes integer from the underlying reader.
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_int128<T: ByteOrder>(&mut self, nbytes: usize) -> Result<i128> {
         let mut buf = [0; 16];
-        try!(self.read_exact(&mut buf[..nbytes]));
+        self.read_exact(&mut buf[..nbytes])?;
         Ok(T::read_int128(&buf[..nbytes], nbytes))
     }
 
@@ -500,7 +498,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_f32<T: ByteOrder>(&mut self) -> Result<f32> {
         let mut buf = [0; 4];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_f32(&buf))
     }
 
@@ -531,7 +529,7 @@ pub trait ReadBytesExt: io::Read {
     #[inline]
     fn read_f64<T: ByteOrder>(&mut self) -> Result<f64> {
         let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf));
+        self.read_exact(&mut buf)?;
         Ok(T::read_f64(&buf))
     }
 
@@ -564,7 +562,7 @@ pub trait ReadBytesExt: io::Read {
     fn read_u16_into<T: ByteOrder>(&mut self, dst: &mut [u16]) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_u16(dst);
         Ok(())
@@ -599,7 +597,7 @@ pub trait ReadBytesExt: io::Read {
     fn read_u32_into<T: ByteOrder>(&mut self, dst: &mut [u32]) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_u32(dst);
         Ok(())
@@ -637,7 +635,7 @@ pub trait ReadBytesExt: io::Read {
     fn read_u64_into<T: ByteOrder>(&mut self, dst: &mut [u64]) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_u64(dst);
         Ok(())
@@ -671,7 +669,6 @@ pub trait ReadBytesExt: io::Read {
     /// rdr.read_u128_into::<BigEndian>(&mut dst).unwrap();
     /// assert_eq!([517, 768], dst);
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_u128_into<T: ByteOrder>(
         &mut self,
@@ -679,7 +676,7 @@ pub trait ReadBytesExt: io::Read {
     ) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_u128(dst);
         Ok(())
@@ -750,7 +747,7 @@ pub trait ReadBytesExt: io::Read {
     fn read_i16_into<T: ByteOrder>(&mut self, dst: &mut [i16]) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_i16(dst);
         Ok(())
@@ -785,7 +782,7 @@ pub trait ReadBytesExt: io::Read {
     fn read_i32_into<T: ByteOrder>(&mut self, dst: &mut [i32]) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_i32(dst);
         Ok(())
@@ -823,7 +820,7 @@ pub trait ReadBytesExt: io::Read {
     fn read_i64_into<T: ByteOrder>(&mut self, dst: &mut [i64]) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_i64(dst);
         Ok(())
@@ -857,7 +854,6 @@ pub trait ReadBytesExt: io::Read {
     /// rdr.read_i128_into::<BigEndian>(&mut dst).unwrap();
     /// assert_eq!([517, 768], dst);
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_i128_into<T: ByteOrder>(
         &mut self,
@@ -865,7 +861,7 @@ pub trait ReadBytesExt: io::Read {
     ) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_i128(dst);
         Ok(())
@@ -906,7 +902,7 @@ pub trait ReadBytesExt: io::Read {
     fn read_f32_into<T: ByteOrder>(&mut self, dst: &mut [f32]) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_f32(dst);
         Ok(())
@@ -991,7 +987,7 @@ pub trait ReadBytesExt: io::Read {
     fn read_f64_into<T: ByteOrder>(&mut self, dst: &mut [f64]) -> Result<()> {
         {
             let buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
+            self.read_exact(buf)?;
         }
         T::from_slice_f64(dst);
         Ok(())
@@ -1402,7 +1398,6 @@ pub trait WriteBytesExt: io::Write {
     }
 
     /// Writes an unsigned 128 bit integer to the underlying writer.
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_u128<T: ByteOrder>(&mut self, n: u128) -> Result<()> {
         let mut buf = [0; 16];
@@ -1411,7 +1406,6 @@ pub trait WriteBytesExt: io::Write {
     }
 
     /// Writes a signed 128 bit integer to the underlying writer.
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_i128<T: ByteOrder>(&mut self, n: i128) -> Result<()> {
         let mut buf = [0; 16];
@@ -1495,7 +1489,6 @@ pub trait WriteBytesExt: io::Write {
     ///
     /// If the given integer is not representable in the given number of bytes,
     /// this method panics. If `nbytes > 16`, this method panics.
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_uint128<T: ByteOrder>(
         &mut self,
@@ -1511,7 +1504,6 @@ pub trait WriteBytesExt: io::Write {
     ///
     /// If the given integer is not representable in the given number of bytes,
     /// this method panics. If `nbytes > 16`, this method panics.
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_int128<T: ByteOrder>(
         &mut self,
diff --git a/src/lib.rs b/src/lib.rs
index f07227f..1f2c9cc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -67,21 +67,15 @@ cases.
 [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
 */
 
-// For the 'try!' macro, until we bump MSRV past 1.12.
-#![allow(deprecated)]
 #![deny(missing_docs)]
 #![cfg_attr(not(feature = "std"), no_std)]
 
-#[cfg(feature = "std")]
-extern crate core;
-
-use core::fmt::Debug;
-use core::hash::Hash;
-use core::ptr::copy_nonoverlapping;
-use core::slice;
+use core::{
+    convert::TryInto, fmt::Debug, hash::Hash, ptr::copy_nonoverlapping, slice,
+};
 
 #[cfg(feature = "std")]
-pub use io::{ReadBytesExt, WriteBytesExt};
+pub use crate::io::{ReadBytesExt, WriteBytesExt};
 
 #[cfg(feature = "std")]
 mod io;
@@ -92,7 +86,6 @@ fn extend_sign(val: u64, nbytes: usize) -> i64 {
     (val << shift) as i64 >> shift
 }
 
-#[cfg(byteorder_i128)]
 #[inline]
 fn extend_sign128(val: u128, nbytes: usize) -> i128 {
     let shift = (16 - nbytes) * 8;
@@ -105,7 +98,6 @@ fn unextend_sign(val: i64, nbytes: usize) -> u64 {
     (val << shift) as u64 >> shift
 }
 
-#[cfg(byteorder_i128)]
 #[inline]
 fn unextend_sign128(val: i128, nbytes: usize) -> u128 {
     let shift = (16 - nbytes) * 8;
@@ -133,7 +125,6 @@ fn pack_size(n: u64) -> usize {
     }
 }
 
-#[cfg(byteorder_i128)]
 #[inline]
 fn pack_size128(n: u128) -> usize {
     if n < 1 << 8 {
@@ -330,7 +321,6 @@ pub trait ByteOrder:
     /// LittleEndian::write_u128(&mut buf, 1_000_000);
     /// assert_eq!(1_000_000, LittleEndian::read_u128(&buf));
     /// ```
-    #[cfg(byteorder_i128)]
     fn read_u128(buf: &[u8]) -> u128;
 
     /// Reads an unsigned n-bytes integer from `buf`.
@@ -371,7 +361,6 @@ pub trait ByteOrder:
     /// LittleEndian::write_uint128(&mut buf, 1_000_000, 3);
     /// assert_eq!(1_000_000, LittleEndian::read_uint128(&buf, 3));
     /// ```
-    #[cfg(byteorder_i128)]
     fn read_uint128(buf: &[u8], nbytes: usize) -> u128;
 
     /// Writes an unsigned 16 bit integer `n` to `buf`.
@@ -490,7 +479,6 @@ pub trait ByteOrder:
     /// LittleEndian::write_u128(&mut buf, 1_000_000);
     /// assert_eq!(1_000_000, LittleEndian::read_u128(&buf));
     /// ```
-    #[cfg(byteorder_i128)]
     fn write_u128(buf: &mut [u8], n: u128);
 
     /// Writes an unsigned integer `n` to `buf` using only `nbytes`.
@@ -531,7 +519,6 @@ pub trait ByteOrder:
     /// LittleEndian::write_uint128(&mut buf, 1_000_000, 3);
     /// assert_eq!(1_000_000, LittleEndian::read_uint128(&buf, 3));
     /// ```
-    #[cfg(byteorder_i128)]
     fn write_uint128(buf: &mut [u8], n: u128, nbytes: usize);
 
     /// Reads a signed 16 bit integer from `buf`.
@@ -661,7 +648,6 @@ pub trait ByteOrder:
     /// LittleEndian::write_i128(&mut buf, -1_000_000_000);
     /// assert_eq!(-1_000_000_000, LittleEndian::read_i128(&buf));
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_i128(buf: &[u8]) -> i128 {
         Self::read_u128(buf) as i128
@@ -708,7 +694,6 @@ pub trait ByteOrder:
     /// LittleEndian::write_int128(&mut buf, -1_000, 3);
     /// assert_eq!(-1_000, LittleEndian::read_int128(&buf, 3));
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_int128(buf: &[u8], nbytes: usize) -> i128 {
         extend_sign128(Self::read_uint128(buf, nbytes), nbytes)
@@ -734,7 +719,7 @@ pub trait ByteOrder:
     /// ```
     #[inline]
     fn read_f32(buf: &[u8]) -> f32 {
-        unsafe { *(&Self::read_u32(buf) as *const u32 as *const f32) }
+        f32::from_bits(Self::read_u32(buf))
     }
 
     /// Reads a IEEE754 double-precision (8 bytes) floating point number.
@@ -757,7 +742,7 @@ pub trait ByteOrder:
     /// ```
     #[inline]
     fn read_f64(buf: &[u8]) -> f64 {
-        unsafe { *(&Self::read_u64(buf) as *const u64 as *const f64) }
+        f64::from_bits(Self::read_u64(buf))
     }
 
     /// Writes a signed 16 bit integer `n` to `buf`.
@@ -887,7 +872,6 @@ pub trait ByteOrder:
     /// LittleEndian::write_i128(&mut buf, -1_000_000_000);
     /// assert_eq!(-1_000_000_000, LittleEndian::read_i128(&buf));
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_i128(buf: &mut [u8], n: i128) {
         Self::write_u128(buf, n as u128)
@@ -934,7 +918,6 @@ pub trait ByteOrder:
     /// LittleEndian::write_int128(&mut buf, -1_000, 3);
     /// assert_eq!(-1_000, LittleEndian::read_int128(&buf, 3));
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_int128(buf: &mut [u8], n: i128, nbytes: usize) {
         Self::write_uint128(buf, unextend_sign128(n, nbytes), nbytes)
@@ -960,8 +943,7 @@ pub trait ByteOrder:
     /// ```
     #[inline]
     fn write_f32(buf: &mut [u8], n: f32) {
-        let n = unsafe { *(&n as *const f32 as *const u32) };
-        Self::write_u32(buf, n)
+        Self::write_u32(buf, n.to_bits())
     }
 
     /// Writes a IEEE754 double-precision (8 bytes) floating point number.
@@ -984,8 +966,7 @@ pub trait ByteOrder:
     /// ```
     #[inline]
     fn write_f64(buf: &mut [u8], n: f64) {
-        let n = unsafe { *(&n as *const f64 as *const u64) };
-        Self::write_u64(buf, n)
+        Self::write_u64(buf, n.to_bits())
     }
 
     /// Reads unsigned 16 bit integers from `src` into `dst`.
@@ -1078,7 +1059,6 @@ pub trait ByteOrder:
     /// LittleEndian::read_u128_into(&bytes, &mut numbers_got);
     /// assert_eq!(numbers_given, numbers_got);
     /// ```
-    #[cfg(byteorder_i128)]
     fn read_u128_into(src: &[u8], dst: &mut [u128]);
 
     /// Reads signed 16 bit integers from `src` to `dst`.
@@ -1189,7 +1169,6 @@ pub trait ByteOrder:
     /// LittleEndian::read_i128_into(&bytes, &mut numbers_got);
     /// assert_eq!(numbers_given, numbers_got);
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_i128_into(src: &[u8], dst: &mut [i128]) {
         let dst = unsafe {
@@ -1411,7 +1390,6 @@ pub trait ByteOrder:
     /// LittleEndian::read_u128_into(&bytes, &mut numbers_got);
     /// assert_eq!(numbers_given, numbers_got);
     /// ```
-    #[cfg(byteorder_i128)]
     fn write_u128_into(src: &[u128], dst: &mut [u8]);
 
     /// Writes signed 8 bit integers from `src` into `dst`.
@@ -1553,7 +1531,6 @@ pub trait ByteOrder:
     /// LittleEndian::read_i128_into(&bytes, &mut numbers_got);
     /// assert_eq!(numbers_given, numbers_got);
     /// ```
-    #[cfg(byteorder_i128)]
     fn write_i128_into(src: &[i128], dst: &mut [u8]) {
         let src = unsafe {
             slice::from_raw_parts(src.as_ptr() as *const u128, src.len())
@@ -1697,7 +1674,6 @@ pub trait ByteOrder:
     /// BigEndian::from_slice_u128(&mut numbers);
     /// assert_eq!(numbers, [5u128.to_be(), 65000u128.to_be()]);
     /// ```
-    #[cfg(byteorder_i128)]
     fn from_slice_u128(numbers: &mut [u128]);
 
     /// Converts the given slice of signed 16 bit integers to a particular
@@ -1792,7 +1768,6 @@ pub trait ByteOrder:
     /// BigEndian::from_slice_i128(&mut numbers);
     /// assert_eq!(numbers, [5i128.to_be(), 65000i128.to_be()]);
     /// ```
-    #[cfg(byteorder_i128)]
     #[inline]
     fn from_slice_i128(src: &mut [i128]) {
         let src = unsafe {
@@ -1924,22 +1899,6 @@ pub type NativeEndian = LittleEndian;
 #[cfg(target_endian = "big")]
 pub type NativeEndian = BigEndian;
 
-macro_rules! read_num_bytes {
-    ($ty:ty, $size:expr, $src:expr, $which:ident) => {{
-        assert!($size == ::core::mem::size_of::<$ty>());
-        assert!($size <= $src.len());
-        let mut data: $ty = 0;
-        unsafe {
-            copy_nonoverlapping(
-                $src.as_ptr(),
-                &mut data as *mut $ty as *mut u8,
-                $size,
-            );
-        }
-        data.$which()
-    }};
-}
-
 macro_rules! write_num_bytes {
     ($ty:ty, $size:expr, $n:expr, $dst:expr, $which:ident) => {{
         assert!($size <= $dst.len());
@@ -1997,23 +1956,22 @@ macro_rules! write_slice {
 impl ByteOrder for BigEndian {
     #[inline]
     fn read_u16(buf: &[u8]) -> u16 {
-        read_num_bytes!(u16, 2, buf, to_be)
+        u16::from_be_bytes(buf.try_into().unwrap())
     }
 
     #[inline]
     fn read_u32(buf: &[u8]) -> u32 {
-        read_num_bytes!(u32, 4, buf, to_be)
+        u32::from_be_bytes(buf.try_into().unwrap())
     }
 
     #[inline]
     fn read_u64(buf: &[u8]) -> u64 {
-        read_num_bytes!(u64, 8, buf, to_be)
+        u64::from_be_bytes(buf.try_into().unwrap())
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_u128(buf: &[u8]) -> u128 {
-        read_num_bytes!(u128, 16, buf, to_be)
+        u128::from_be_bytes(buf.try_into().unwrap())
     }
 
     #[inline]
@@ -2031,7 +1989,6 @@ impl ByteOrder for BigEndian {
         out.to_be()
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_uint128(buf: &[u8], nbytes: usize) -> u128 {
         assert!(1 <= nbytes && nbytes <= 16 && nbytes <= buf.len());
@@ -2062,7 +2019,6 @@ impl ByteOrder for BigEndian {
         write_num_bytes!(u64, 8, n, buf, to_be);
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_u128(buf: &mut [u8], n: u128) {
         write_num_bytes!(u128, 16, n, buf, to_be);
@@ -2082,7 +2038,6 @@ impl ByteOrder for BigEndian {
         }
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_uint128(buf: &mut [u8], n: u128, nbytes: usize) {
         assert!(pack_size128(n) <= nbytes && nbytes <= 16);
@@ -2112,7 +2067,6 @@ impl ByteOrder for BigEndian {
         read_slice!(src, dst, 8, to_be);
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_u128_into(src: &[u8], dst: &mut [u128]) {
         read_slice!(src, dst, 16, to_be);
@@ -2145,7 +2099,6 @@ impl ByteOrder for BigEndian {
         }
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_u128_into(src: &[u128], dst: &mut [u8]) {
         if cfg!(target_endian = "big") {
@@ -2182,7 +2135,6 @@ impl ByteOrder for BigEndian {
         }
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn from_slice_u128(numbers: &mut [u128]) {
         if cfg!(target_endian = "little") {
@@ -2220,23 +2172,22 @@ impl ByteOrder for BigEndian {
 impl ByteOrder for LittleEndian {
     #[inline]
     fn read_u16(buf: &[u8]) -> u16 {
-        read_num_bytes!(u16, 2, buf, to_le)
+        u16::from_le_bytes(buf.try_into().unwrap())
     }
 
     #[inline]
     fn read_u32(buf: &[u8]) -> u32 {
-        read_num_bytes!(u32, 4, buf, to_le)
+        u32::from_le_bytes(buf.try_into().unwrap())
     }
 
     #[inline]
     fn read_u64(buf: &[u8]) -> u64 {
-        read_num_bytes!(u64, 8, buf, to_le)
+        u64::from_le_bytes(buf.try_into().unwrap())
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_u128(buf: &[u8]) -> u128 {
-        read_num_bytes!(u128, 16, buf, to_le)
+        u128::from_le_bytes(buf.try_into().unwrap())
     }
 
     #[inline]
@@ -2250,7 +2201,6 @@ impl ByteOrder for LittleEndian {
         out.to_le()
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_uint128(buf: &[u8], nbytes: usize) -> u128 {
         assert!(1 <= nbytes && nbytes <= 16 && nbytes <= buf.len());
@@ -2277,7 +2227,6 @@ impl ByteOrder for LittleEndian {
         write_num_bytes!(u64, 8, n, buf, to_le);
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_u128(buf: &mut [u8], n: u128) {
         write_num_bytes!(u128, 16, n, buf, to_le);
@@ -2293,7 +2242,6 @@ impl ByteOrder for LittleEndian {
         }
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_uint128(buf: &mut [u8], n: u128, nbytes: usize) {
         assert!(pack_size128(n as u128) <= nbytes && nbytes <= 16);
@@ -2319,7 +2267,6 @@ impl ByteOrder for LittleEndian {
         read_slice!(src, dst, 8, to_le);
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn read_u128_into(src: &[u8], dst: &mut [u128]) {
         read_slice!(src, dst, 16, to_le);
@@ -2352,7 +2299,6 @@ impl ByteOrder for LittleEndian {
         }
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn write_u128_into(src: &[u128], dst: &mut [u8]) {
         if cfg!(target_endian = "little") {
@@ -2389,7 +2335,6 @@ impl ByteOrder for LittleEndian {
         }
     }
 
-    #[cfg(byteorder_i128)]
     #[inline]
     fn from_slice_u128(numbers: &mut [u128]) {
         if cfg!(target_endian = "big") {
@@ -2426,15 +2371,8 @@ impl ByteOrder for LittleEndian {
 
 #[cfg(test)]
 mod test {
-    extern crate quickcheck;
-    extern crate rand;
-
-    #[cfg(byteorder_i128)]
-    use self::quickcheck::{Arbitrary, Gen};
-    use self::quickcheck::{QuickCheck, StdGen, Testable};
-    use self::rand::thread_rng;
-    #[cfg(byteorder_i128)]
-    use self::rand::Rng;
+    use quickcheck::{Arbitrary, Gen, QuickCheck, StdGen, Testable};
+    use rand::{thread_rng, Rng};
 
     pub const U24_MAX: u32 = 16_777_215;
     pub const I24_MAX: i32 = 8_388_607;
@@ -2456,7 +2394,6 @@ mod test {
     #[derive(Clone, Debug)]
     pub struct Wi128<T>(pub T);
 
-    #[cfg(byteorder_i128)]
     impl<T: Clone> Wi128<T> {
         pub fn clone(&self) -> T {
             self.0.clone()
@@ -2469,7 +2406,6 @@ mod test {
         }
     }
 
-    #[cfg(byteorder_i128)]
     impl Arbitrary for Wi128<u128> {
         fn arbitrary<G: Gen>(gen: &mut G) -> Wi128<u128> {
             let max = calc_max!(::core::u128::MAX, gen.size(), 16);
@@ -2479,7 +2415,6 @@ mod test {
         }
     }
 
-    #[cfg(byteorder_i128)]
     impl Arbitrary for Wi128<i128> {
         fn arbitrary<G: Gen>(gen: &mut G) -> Wi128<i128> {
             let max = calc_max!(::core::i128::MAX, gen.size(), 16);
@@ -2503,7 +2438,9 @@ mod test {
             mod $name {
                 #[allow(unused_imports)]
                 use super::{qc_sized, Wi128};
-                use {BigEndian, ByteOrder, LittleEndian, NativeEndian};
+                use crate::{
+                    BigEndian, ByteOrder, LittleEndian, NativeEndian,
+                };
 
                 #[test]
                 fn big_endian() {
@@ -2541,8 +2478,10 @@ mod test {
             mod $name {
                 #[allow(unused_imports)]
                 use super::{qc_sized, Wi128};
+                use crate::{
+                    BigEndian, ByteOrder, LittleEndian, NativeEndian,
+                };
                 use core::mem::size_of;
-                use {BigEndian, ByteOrder, LittleEndian, NativeEndian};
 
                 #[test]
                 fn big_endian() {
@@ -2594,8 +2533,20 @@ mod test {
         read_i16,
         write_i16
     );
-    qc_byte_order!(prop_u24, u32, ::test::U24_MAX as u64, read_u24, write_u24);
-    qc_byte_order!(prop_i24, i32, ::test::I24_MAX as u64, read_i24, write_i24);
+    qc_byte_order!(
+        prop_u24,
+        u32,
+        crate::test::U24_MAX as u64,
+        read_u24,
+        write_u24
+    );
+    qc_byte_order!(
+        prop_i24,
+        i32,
+        crate::test::I24_MAX as u64,
+        read_i24,
+        write_i24
+    );
     qc_byte_order!(
         prop_u32,
         u32,
@@ -2610,8 +2561,20 @@ mod test {
         read_i32,
         write_i32
     );
-    qc_byte_order!(prop_u48, u64, ::test::U48_MAX as u64, read_u48, write_u48);
-    qc_byte_order!(prop_i48, i64, ::test::I48_MAX as u64, read_i48, write_i48);
+    qc_byte_order!(
+        prop_u48,
+        u64,
+        crate::test::U48_MAX as u64,
+        read_u48,
+        write_u48
+    );
+    qc_byte_order!(
+        prop_i48,
+        i64,
+        crate::test::I48_MAX as u64,
+        read_i48,
+        write_i48
+    );
     qc_byte_order!(
         prop_u64,
         u64,
@@ -2641,9 +2604,7 @@ mod test {
         write_f64
     );
 
-    #[cfg(byteorder_i128)]
     qc_byte_order!(prop_u128, Wi128<u128>, 16 + 1, read_u128, write_u128);
-    #[cfg(byteorder_i128)]
     qc_byte_order!(prop_i128, Wi128<i128>, 16 + 1, read_i128, write_i128);
 
     qc_byte_order!(
@@ -2711,7 +2672,6 @@ mod test {
         write_uint
     );
 
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_1,
         Wi128<u128>,
@@ -2720,7 +2680,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_2,
         Wi128<u128>,
@@ -2729,7 +2688,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_3,
         Wi128<u128>,
@@ -2738,7 +2696,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_4,
         Wi128<u128>,
@@ -2747,7 +2704,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_5,
         Wi128<u128>,
@@ -2756,7 +2712,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_6,
         Wi128<u128>,
@@ -2765,7 +2720,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_7,
         Wi128<u128>,
@@ -2774,7 +2728,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_8,
         Wi128<u128>,
@@ -2783,7 +2736,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_9,
         Wi128<u128>,
@@ -2792,7 +2744,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_10,
         Wi128<u128>,
@@ -2801,7 +2752,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_11,
         Wi128<u128>,
@@ -2810,7 +2760,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_12,
         Wi128<u128>,
@@ -2819,7 +2768,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_13,
         Wi128<u128>,
@@ -2828,7 +2776,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_14,
         Wi128<u128>,
@@ -2837,7 +2784,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_15,
         Wi128<u128>,
@@ -2846,7 +2792,6 @@ mod test {
         read_uint128,
         write_uint128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_uint128_16,
         Wi128<u128>,
@@ -2921,7 +2866,6 @@ mod test {
         write_int
     );
 
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_1,
         Wi128<i128>,
@@ -2930,7 +2874,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_2,
         Wi128<i128>,
@@ -2939,7 +2882,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_3,
         Wi128<i128>,
@@ -2948,7 +2890,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_4,
         Wi128<i128>,
@@ -2957,7 +2898,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_5,
         Wi128<i128>,
@@ -2966,7 +2906,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_6,
         Wi128<i128>,
@@ -2975,7 +2914,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_7,
         Wi128<i128>,
@@ -2984,7 +2922,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_8,
         Wi128<i128>,
@@ -2993,7 +2930,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_9,
         Wi128<i128>,
@@ -3002,7 +2938,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_10,
         Wi128<i128>,
@@ -3011,7 +2946,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_11,
         Wi128<i128>,
@@ -3020,7 +2954,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_12,
         Wi128<i128>,
@@ -3029,7 +2962,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_13,
         Wi128<i128>,
@@ -3038,7 +2970,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_14,
         Wi128<i128>,
@@ -3047,7 +2978,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_15,
         Wi128<i128>,
@@ -3056,7 +2986,6 @@ mod test {
         read_int128,
         write_int128
     );
-    #[cfg(byteorder_i128)]
     qc_byte_order!(
         prop_int128_16,
         Wi128<i128>,
@@ -3075,7 +3004,9 @@ mod test {
         ($name:ident, $maximally_small:expr, $zero:expr,
          $read:ident, $write:ident) => {
             mod $name {
-                use {BigEndian, ByteOrder, LittleEndian, NativeEndian};
+                use crate::{
+                    BigEndian, ByteOrder, LittleEndian, NativeEndian,
+                };
 
                 #[test]
                 #[should_panic]
@@ -3122,7 +3053,9 @@ mod test {
         };
         ($name:ident, $maximally_small:expr, $read:ident) => {
             mod $name {
-                use {BigEndian, ByteOrder, LittleEndian, NativeEndian};
+                use crate::{
+                    BigEndian, ByteOrder, LittleEndian, NativeEndian,
+                };
 
                 #[test]
                 #[should_panic]
@@ -3156,9 +3089,7 @@ mod test {
     too_small!(small_i64, 7, 0, read_i64, write_i64);
     too_small!(small_f32, 3, 0.0, read_f32, write_f32);
     too_small!(small_f64, 7, 0.0, read_f64, write_f64);
-    #[cfg(byteorder_i128)]
     too_small!(small_u128, 15, 0, read_u128, write_u128);
-    #[cfg(byteorder_i128)]
     too_small!(small_i128, 15, 0, read_i128, write_i128);
 
     too_small!(small_uint_1, 1, read_uint);
@@ -3169,35 +3100,20 @@ mod test {
     too_small!(small_uint_6, 6, read_uint);
     too_small!(small_uint_7, 7, read_uint);
 
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_1, 1, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_2, 2, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_3, 3, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_4, 4, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_5, 5, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_6, 6, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_7, 7, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_8, 8, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_9, 9, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_10, 10, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_11, 11, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_12, 12, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_13, 13, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_14, 14, read_uint128);
-    #[cfg(byteorder_i128)]
     too_small!(small_uint128_15, 15, read_uint128);
 
     too_small!(small_int_1, 1, read_int);
@@ -3208,35 +3124,20 @@ mod test {
     too_small!(small_int_6, 6, read_int);
     too_small!(small_int_7, 7, read_int);
 
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_1, 1, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_2, 2, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_3, 3, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_4, 4, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_5, 5, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_6, 6, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_7, 7, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_8, 8, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_9, 9, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_10, 10, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_11, 11, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_12, 12, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_13, 13, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_14, 14, read_int128);
-    #[cfg(byteorder_i128)]
     too_small!(small_int128_15, 15, read_int128);
 
     // Test that reading/writing slices enforces the correct lengths.
@@ -3244,7 +3145,9 @@ mod test {
         ($name:ident, $read:ident, $write:ident,
          $num_bytes:expr, $numbers:expr) => {
             mod $name {
-                use {BigEndian, ByteOrder, LittleEndian, NativeEndian};
+                use crate::{
+                    BigEndian, ByteOrder, LittleEndian, NativeEndian,
+                };
 
                 #[test]
                 #[should_panic]
@@ -3384,7 +3287,6 @@ mod test {
         [0, 0]
     );
 
-    #[cfg(byteorder_i128)]
     slice_lengths!(
         slice_len_too_small_u128,
         read_u128_into,
@@ -3392,7 +3294,6 @@ mod test {
         31,
         [0, 0]
     );
-    #[cfg(byteorder_i128)]
     slice_lengths!(
         slice_len_too_big_u128,
         read_u128_into,
@@ -3400,7 +3301,6 @@ mod test {
         33,
         [0, 0]
     );
-    #[cfg(byteorder_i128)]
     slice_lengths!(
         slice_len_too_small_i128,
         read_i128_into,
@@ -3408,7 +3308,6 @@ mod test {
         31,
         [0, 0]
     );
-    #[cfg(byteorder_i128)]
     slice_lengths!(
         slice_len_too_big_i128,
         read_i128_into,
@@ -3419,7 +3318,7 @@ mod test {
 
     #[test]
     fn uint_bigger_buffer() {
-        use {ByteOrder, LittleEndian};
+        use crate::{ByteOrder, LittleEndian};
         let n = LittleEndian::read_uint(&[1, 2, 3, 4, 5, 6, 7, 8], 5);
         assert_eq!(n, 0x05_0403_0201);
     }
@@ -3452,13 +3351,13 @@ mod stdtests {
         ($name:ident, $ty_int:ty, $max:expr,
          $bytes:expr, $read:ident, $write:ident) => {
             mod $name {
-                use std::io::Cursor;
                 #[allow(unused_imports)]
-                use test::{qc_sized, Wi128};
-                use {
+                use crate::test::{qc_sized, Wi128};
+                use crate::{
                     BigEndian, LittleEndian, NativeEndian, ReadBytesExt,
                     WriteBytesExt,
                 };
+                use std::io::Cursor;
 
                 #[test]
                 fn big_endian() {
@@ -3502,13 +3401,13 @@ mod stdtests {
         };
         ($name:ident, $ty_int:ty, $max:expr, $read:ident, $write:ident) => {
             mod $name {
-                use std::io::Cursor;
                 #[allow(unused_imports)]
-                use test::{qc_sized, Wi128};
-                use {
+                use crate::test::{qc_sized, Wi128};
+                use crate::{
                     BigEndian, LittleEndian, NativeEndian, ReadBytesExt,
                     WriteBytesExt,
                 };
+                use std::io::Cursor;
 
                 #[test]
                 fn big_endian() {
@@ -3603,15 +3502,13 @@ mod stdtests {
         write_f64
     );
 
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(prop_ext_u128, Wi128<u128>, 16 + 1, read_u128, write_u128);
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(prop_ext_i128, Wi128<i128>, 16 + 1, read_i128, write_i128);
 
     qc_bytes_ext!(
         prop_ext_uint_1,
         u64,
-        calc_max!(::test::U64_MAX, 1),
+        calc_max!(crate::test::U64_MAX, 1),
         1,
         read_uint,
         write_u64
@@ -3619,7 +3516,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_uint_2,
         u64,
-        calc_max!(::test::U64_MAX, 2),
+        calc_max!(crate::test::U64_MAX, 2),
         2,
         read_uint,
         write_u64
@@ -3627,7 +3524,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_uint_3,
         u64,
-        calc_max!(::test::U64_MAX, 3),
+        calc_max!(crate::test::U64_MAX, 3),
         3,
         read_uint,
         write_u64
@@ -3635,7 +3532,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_uint_4,
         u64,
-        calc_max!(::test::U64_MAX, 4),
+        calc_max!(crate::test::U64_MAX, 4),
         4,
         read_uint,
         write_u64
@@ -3643,7 +3540,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_uint_5,
         u64,
-        calc_max!(::test::U64_MAX, 5),
+        calc_max!(crate::test::U64_MAX, 5),
         5,
         read_uint,
         write_u64
@@ -3651,7 +3548,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_uint_6,
         u64,
-        calc_max!(::test::U64_MAX, 6),
+        calc_max!(crate::test::U64_MAX, 6),
         6,
         read_uint,
         write_u64
@@ -3659,7 +3556,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_uint_7,
         u64,
-        calc_max!(::test::U64_MAX, 7),
+        calc_max!(crate::test::U64_MAX, 7),
         7,
         read_uint,
         write_u64
@@ -3667,13 +3564,12 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_uint_8,
         u64,
-        calc_max!(::test::U64_MAX, 8),
+        calc_max!(crate::test::U64_MAX, 8),
         8,
         read_uint,
         write_u64
     );
 
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_1,
         Wi128<u128>,
@@ -3682,7 +3578,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_2,
         Wi128<u128>,
@@ -3691,7 +3586,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_3,
         Wi128<u128>,
@@ -3700,7 +3594,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_4,
         Wi128<u128>,
@@ -3709,7 +3602,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_5,
         Wi128<u128>,
@@ -3718,7 +3610,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_6,
         Wi128<u128>,
@@ -3727,7 +3618,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_7,
         Wi128<u128>,
@@ -3736,7 +3626,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_8,
         Wi128<u128>,
@@ -3745,7 +3634,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_9,
         Wi128<u128>,
@@ -3754,7 +3642,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_10,
         Wi128<u128>,
@@ -3763,7 +3650,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_11,
         Wi128<u128>,
@@ -3772,7 +3658,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_12,
         Wi128<u128>,
@@ -3781,7 +3666,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_13,
         Wi128<u128>,
@@ -3790,7 +3674,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_14,
         Wi128<u128>,
@@ -3799,7 +3682,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_15,
         Wi128<u128>,
@@ -3808,7 +3690,6 @@ mod stdtests {
         read_uint128,
         write_u128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_uint128_16,
         Wi128<u128>,
@@ -3821,7 +3702,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_int_1,
         i64,
-        calc_max!(::test::I64_MAX, 1),
+        calc_max!(crate::test::I64_MAX, 1),
         1,
         read_int,
         write_i64
@@ -3829,7 +3710,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_int_2,
         i64,
-        calc_max!(::test::I64_MAX, 2),
+        calc_max!(crate::test::I64_MAX, 2),
         2,
         read_int,
         write_i64
@@ -3837,7 +3718,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_int_3,
         i64,
-        calc_max!(::test::I64_MAX, 3),
+        calc_max!(crate::test::I64_MAX, 3),
         3,
         read_int,
         write_i64
@@ -3845,7 +3726,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_int_4,
         i64,
-        calc_max!(::test::I64_MAX, 4),
+        calc_max!(crate::test::I64_MAX, 4),
         4,
         read_int,
         write_i64
@@ -3853,7 +3734,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_int_5,
         i64,
-        calc_max!(::test::I64_MAX, 5),
+        calc_max!(crate::test::I64_MAX, 5),
         5,
         read_int,
         write_i64
@@ -3861,7 +3742,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_int_6,
         i64,
-        calc_max!(::test::I64_MAX, 6),
+        calc_max!(crate::test::I64_MAX, 6),
         6,
         read_int,
         write_i64
@@ -3869,7 +3750,7 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_int_7,
         i64,
-        calc_max!(::test::I64_MAX, 1),
+        calc_max!(crate::test::I64_MAX, 1),
         7,
         read_int,
         write_i64
@@ -3877,13 +3758,12 @@ mod stdtests {
     qc_bytes_ext!(
         prop_ext_int_8,
         i64,
-        calc_max!(::test::I64_MAX, 8),
+        calc_max!(crate::test::I64_MAX, 8),
         8,
         read_int,
         write_i64
     );
 
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_1,
         Wi128<i128>,
@@ -3892,7 +3772,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_2,
         Wi128<i128>,
@@ -3901,7 +3780,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_3,
         Wi128<i128>,
@@ -3910,7 +3788,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_4,
         Wi128<i128>,
@@ -3919,7 +3796,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_5,
         Wi128<i128>,
@@ -3928,7 +3804,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_6,
         Wi128<i128>,
@@ -3937,7 +3812,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_7,
         Wi128<i128>,
@@ -3946,7 +3820,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_8,
         Wi128<i128>,
@@ -3955,7 +3828,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_9,
         Wi128<i128>,
@@ -3964,7 +3836,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_10,
         Wi128<i128>,
@@ -3973,7 +3844,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_11,
         Wi128<i128>,
@@ -3982,7 +3852,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_12,
         Wi128<i128>,
@@ -3991,7 +3860,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_13,
         Wi128<i128>,
@@ -4000,7 +3868,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_14,
         Wi128<i128>,
@@ -4009,7 +3876,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_15,
         Wi128<i128>,
@@ -4018,7 +3884,6 @@ mod stdtests {
         read_int128,
         write_i128
     );
-    #[cfg(byteorder_i128)]
     qc_bytes_ext!(
         prop_ext_int128_16,
         Wi128<i128>,
@@ -4033,10 +3898,12 @@ mod stdtests {
         ($name:ident, $ty_int:ty, $read:ident, $write:ident, $zero:expr) => {
             mod $name {
                 use super::qc_unsized;
-                use core::mem::size_of;
                 #[allow(unused_imports)]
-                use test::Wi128;
-                use {BigEndian, ByteOrder, LittleEndian, NativeEndian};
+                use crate::test::Wi128;
+                use crate::{
+                    BigEndian, ByteOrder, LittleEndian, NativeEndian,
+                };
+                use core::mem::size_of;
 
                 #[test]
                 fn big_endian() {
@@ -4110,7 +3977,6 @@ mod stdtests {
     qc_slice!(prop_slice_i32, i32, read_i32_into, write_i32_into, 0);
     qc_slice!(prop_slice_u64, u64, read_u64_into, write_u64_into, 0);
     qc_slice!(prop_slice_i64, i64, read_i64_into, write_i64_into, 0);
-    #[cfg(byteorder_i128)]
     qc_slice!(
         prop_slice_u128,
         Wi128<u128>,
@@ -4118,7 +3984,6 @@ mod stdtests {
         write_u128_into,
         0
     );
-    #[cfg(byteorder_i128)]
     qc_slice!(
         prop_slice_i128,
         Wi128<i128>,


Test patch: