From 669de586cdbb5469d0cfa2bdd930aea8b401d1b9 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Tue, 15 Oct 2024 13:29:28 -0600 Subject: [PATCH] pem-rfc7468: leverage `core::error::Error`; MSRV 1.81 Allows use of the `Error` trait without the `std` feature enabled, which was stabilized in Rust 1.81 --- .github/workflows/pem-rfc7468.yml | 6 +++--- pem-rfc7468/Cargo.toml | 2 +- pem-rfc7468/README.md | 4 ++-- pem-rfc7468/src/error.rs | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pem-rfc7468.yml b/.github/workflows/pem-rfc7468.yml index 037f044ab..098644271 100644 --- a/.github/workflows/pem-rfc7468.yml +++ b/.github/workflows/pem-rfc7468.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: rust: - - 1.65.0 # MSRV + - 1.81.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -41,14 +41,14 @@ jobs: minimal-versions: uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master with: - working-directory: ${{ github.workflow }} + working-directory: ${{ github.workflow }} test: runs-on: ubuntu-latest strategy: matrix: rust: - - 1.65.0 # MSRV + - 1.81.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/pem-rfc7468/Cargo.toml b/pem-rfc7468/Cargo.toml index 83423fa2a..91797a07a 100644 --- a/pem-rfc7468/Cargo.toml +++ b/pem-rfc7468/Cargo.toml @@ -16,7 +16,7 @@ categories = ["cryptography", "data-structures", "encoding", "no-std", "parser-i keywords = ["crypto", "key", "pem", "pkcs", "rsa"] readme = "README.md" edition = "2021" -rust-version = "1.60" +rust-version = "1.81" [dependencies] base64ct = { version = "1.4" } diff --git a/pem-rfc7468/README.md b/pem-rfc7468/README.md index ad557de7e..5e294d30e 100644 --- a/pem-rfc7468/README.md +++ b/pem-rfc7468/README.md @@ -58,7 +58,7 @@ to practically extract RSA private keys from SGX enclaves. ## Minimum Supported Rust Version -This crate requires **Rust 1.60** at a minimum. +This crate requires **Rust 1.81** at a minimum. We may change the MSRV in the future, but it will be accompanied by a minor version bump. @@ -87,7 +87,7 @@ dual licensed as above, without any additional terms or conditions. [build-image]: https://github.com/RustCrypto/formats/actions/workflows/pem-rfc7468.yml/badge.svg [build-link]: https://github.com/RustCrypto/formats/actions/workflows/pem-rfc7468.yml [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.81+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/300570-formats diff --git a/pem-rfc7468/src/error.rs b/pem-rfc7468/src/error.rs index 61da64776..ae36ab274 100644 --- a/pem-rfc7468/src/error.rs +++ b/pem-rfc7468/src/error.rs @@ -70,8 +70,7 @@ impl fmt::Display for Error { } } -#[cfg(feature = "std")] -impl std::error::Error for Error {} +impl core::error::Error for Error {} impl From for Error { fn from(err: base64ct::Error) -> Error {