Skip to content

Commit c25e95b

Browse files
committed
Leverage core::error::Error; MSRV 1.81
Now that `core::error::Error` is stable in 1.81, leverages it to make the `Error` impl always available. Since `ssh-cipher` has no other dependencies on `std`, removes the `std` feature from this crate entirely.
1 parent b7dfc0b commit c25e95b

20 files changed

Lines changed: 54 additions & 64 deletions

File tree

.github/workflows/ssh-cipher.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
matrix:
3232
rust:
33-
- 1.72.0 # MSRV
33+
- 1.81.0 # MSRV
3434
- stable
3535
target:
3636
- thumbv7em-none-eabi
@@ -49,7 +49,7 @@ jobs:
4949
strategy:
5050
matrix:
5151
rust:
52-
- 1.72.0 # MSRV
52+
- 1.81.0 # MSRV
5353
- stable
5454
steps:
5555
- uses: actions/checkout@v4

.github/workflows/ssh-encoding.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
strategy:
2929
matrix:
3030
rust:
31-
- 1.71.0 # MSRV
31+
- 1.81.0 # MSRV
3232
- stable
3333
target:
3434
- thumbv7em-none-eabi
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
matrix:
4949
rust:
50-
- 1.71.0 # MSRV
50+
- 1.81.0 # MSRV
5151
- stable
5252
steps:
5353
- uses: actions/checkout@v4

.github/workflows/ssh-key.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
strategy:
6161
matrix:
6262
rust:
63-
- 1.73.0 # MSRV
63+
- 1.81.0 # MSRV
6464
- stable
6565
target:
6666
- thumbv7em-none-eabi
@@ -80,7 +80,7 @@ jobs:
8080
strategy:
8181
matrix:
8282
rust:
83-
- 1.73.0 # MSRV
83+
- 1.81.0 # MSRV
8484
- stable
8585
steps:
8686
- uses: actions/checkout@v4

.github/workflows/ssh-protocol.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
matrix:
2727
rust:
28-
- 1.73.0 # MSRV
28+
- 1.81.0 # MSRV
2929
- stable
3030
steps:
3131
- uses: actions/checkout@v4

.github/workflows/workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v4
2222
- uses: dtolnay/rust-toolchain@stable
2323
with:
24-
toolchain: 1.80.0
24+
toolchain: 1.81.0
2525
components: clippy
2626
- run: cargo clippy --all-features
2727

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh-cipher/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ categories = ["cryptography", "no-std"]
1616
keywords = ["crypto", "encryption", "openssh", "ssh"]
1717
readme = "README.md"
1818
edition = "2021"
19-
rust-version = "1.72"
19+
rust-version = "1.81"
2020

2121
[dependencies]
2222
cipher = "=0.5.0-pre.6"
@@ -38,8 +38,6 @@ zeroize = { version = "1", optional = true, default-features = false }
3838
hex-literal = "0.4"
3939

4040
[features]
41-
std = []
42-
4341
aes-cbc = ["dep:aes", "dep:cbc"]
4442
aes-ctr = ["dep:aes", "dep:ctr"]
4543
aes-gcm = ["dep:aead", "dep:aes", "dep:aes-gcm"]

ssh-cipher/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Built on the pure Rust cryptography implementations maintained by the
2121

2222
## Minimum Supported Rust Version
2323

24-
This crate requires **Rust 1.60** at a minimum.
24+
This crate requires **Rust 1.81** at a minimum.
2525

2626
We may change the MSRV in the future, but it will be accompanied by a minor
2727
version bump.
@@ -48,7 +48,7 @@ dual licensed as above, without any additional terms or conditions.
4848
[docs-image]: https://docs.rs/ssh-cipher/badge.svg
4949
[docs-link]: https://docs.rs/ssh-cipher/
5050
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
51-
[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg
51+
[rustc-image]: https://img.shields.io/badge/rustc-1.81+-blue.svg
5252
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
5353
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/346919-SSH
5454
[build-image]: https://github.com/RustCrypto/SSH/actions/workflows/ssh-cipher.yml/badge.svg

ssh-cipher/src/error.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ impl fmt::Display for Error {
4242
}
4343
}
4444

45-
#[cfg(feature = "std")]
46-
impl std::error::Error for Error {}
45+
impl core::error::Error for Error {}

ssh-cipher/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
unused_qualifications
2222
)]
2323

24-
#[cfg(feature = "std")]
25-
extern crate std;
26-
2724
mod error;
2825

2926
#[cfg(feature = "chacha20poly1305")]

0 commit comments

Comments
 (0)