diff --git a/.github/workflows/hybrid-array.yml b/.github/workflows/hybrid-array.yml index fedad55..e2bf9cc 100644 --- a/.github/workflows/hybrid-array.yml +++ b/.github/workflows/hybrid-array.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: rust: - - 1.65.0 # MSRV + - 1.81.0 # MSRV - stable target: - armv7a-none-eabi @@ -53,7 +53,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.75.0 + toolchain: 1.81.0 components: clippy - run: cargo clippy --all --all-features -- -D warnings @@ -95,7 +95,7 @@ jobs: strategy: matrix: toolchain: - - 1.65.0 # MSRV + - 1.81.0 # MSRV - stable runs-on: ubuntu-latest steps: diff --git a/Cargo.toml b/Cargo.toml index f776f5a..4c8c312 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,14 +14,13 @@ categories = ["no-std", "data-structures"] keywords = ["generic-array"] readme = "README.md" edition = "2021" -rust-version = "1.65" +rust-version = "1.81.0" [dependencies] typenum = { version = "1.17", features = ["const-generics"] } zeroize = { version = "1.8", optional = true, default-features = false } [features] -std = [] extra-sizes = [] [package.metadata.docs.rs] diff --git a/src/iter.rs b/src/iter.rs index 3ba5f03..281bab1 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -18,8 +18,7 @@ impl fmt::Display for TryFromIteratorError { } } -#[cfg(feature = "std")] -impl std::error::Error for TryFromIteratorError {} +impl core::error::Error for TryFromIteratorError {} impl Array where diff --git a/src/lib.rs b/src/lib.rs index 4c8e037..3488551 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,9 +84,6 @@ //! If you have any questions, please //! [start a discussion](https://github.com/RustCrypto/hybrid-array/discussions). -#[cfg(feature = "std")] -extern crate std; - pub mod sizes; mod from_fn; @@ -207,7 +204,7 @@ where U: Add, Sum: ArraySize, { - self.into_iter().chain(other.into_iter()).collect() + self.into_iter().chain(other).collect() } /// Splits `self` at index `N` in two arrays. @@ -766,7 +763,7 @@ where #[inline] fn try_from(slice: &'a [T]) -> Result, TryFromSliceError> { - <&'a Self>::try_from(slice).map(Clone::clone) + <&'a Self>::try_from(slice).cloned() } }