Skip to content

Commit

Permalink
pem-rfc7468: leverage core::error::Error; MSRV 1.81
Browse files Browse the repository at this point in the history
Allows use of the `Error` trait without the `std` feature enabled, which
was stabilized in Rust 1.81
  • Loading branch information
tarcieri committed Oct 15, 2024
1 parent 8f1e468 commit 669de58
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pem-rfc7468.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
matrix:
rust:
- 1.65.0 # MSRV
- 1.81.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pem-rfc7468/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions pem-rfc7468/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions pem-rfc7468/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<base64ct::Error> for Error {
fn from(err: base64ct::Error) -> Error {
Expand Down

0 comments on commit 669de58

Please sign in to comment.