Skip to content

Commit 66ca151

Browse files
authored
crypto-common: use core::error::Error trait; MSRV 1.81 (#1660)
The `core::error::Error` trait is now stable, meaning we no longer need to gate impls for it on a `std` feature.
1 parent c7a7fa4 commit 66ca151

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
lines changed

.github/workflows/crypto-common.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: crypto-common
22

33
on:
44
pull_request:
5-
paths:
6-
- "crypto-common/**"
7-
- "Cargo.*"
5+
paths:
6+
- "crypto-common/**"
7+
- "Cargo.*"
88
push:
99
branches: master
1010

@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
rust:
25-
- 1.65.0 # MSRV
25+
- 1.81.0 # MSRV
2626
- stable
2727
target:
2828
- thumbv7em-none-eabi
@@ -39,14 +39,14 @@ jobs:
3939
minimal-versions:
4040
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
4141
with:
42-
working-directory: ${{ github.workflow }}
42+
working-directory: ${{ github.workflow }}
4343

4444
test:
4545
runs-on: ubuntu-latest
4646
strategy:
4747
matrix:
4848
rust:
49-
- 1.65.0 # MSRV
49+
- 1.81.0 # MSRV
5050
- stable
5151
steps:
5252
- uses: actions/checkout@v4

crypto-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["RustCrypto Developers"]
66
license = "MIT OR Apache-2.0"
77
readme = "README.md"
88
edition = "2021"
9-
rust-version = "1.65"
9+
rust-version = "1.81"
1010
documentation = "https://docs.rs/crypto-common"
1111
repository = "https://github.com/RustCrypto/traits"
1212
keywords = ["crypto", "traits"]

crypto-common/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ higher-level trait crates instead of this one.
1414

1515
## Minimum Supported Rust Version
1616

17-
Rust **1.65** or higher.
17+
Rust **1.81** or higher.
1818

1919
Minimum supported Rust version can be changed in the future, but it will be
2020
done with a minor version bump.
@@ -46,7 +46,7 @@ dual licensed as above, without any additional terms or conditions.
4646
[docs-image]: https://docs.rs/crypto-common/badge.svg
4747
[docs-link]: https://docs.rs/crypto-common/
4848
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
49-
[rustc-image]: https://img.shields.io/badge/rustc-1.65+-blue.svg
49+
[rustc-image]: https://img.shields.io/badge/rustc-1.81+-blue.svg
5050
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
5151
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260041-hashes
5252
[build-image]: https://github.com/RustCrypto/traits/workflows/crypto-common/badge.svg?branch=master&event=push

crypto-common/src/hazmat.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ impl fmt::Display for DeserializeStateError {
2424
}
2525
}
2626

27-
#[cfg(feature = "std")]
28-
impl std::error::Error for DeserializeStateError {}
27+
impl core::error::Error for DeserializeStateError {}
2928

3029
/// Types which can serialize the internal state and be restored from it.
3130
///

crypto-common/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
#![forbid(unsafe_code)]
1010
#![warn(missing_docs, rust_2018_idioms, missing_debug_implementations)]
1111

12-
#[cfg(feature = "std")]
13-
extern crate std;
14-
1512
/// Hazardous materials.
1613
pub mod hazmat;
1714

@@ -389,5 +386,4 @@ impl fmt::Display for InvalidLength {
389386
}
390387
}
391388

392-
#[cfg(feature = "std")]
393-
impl std::error::Error for InvalidLength {}
389+
impl core::error::Error for InvalidLength {}

0 commit comments

Comments
 (0)