Skip to content

Commit ec4bddf

Browse files
committed
cipher: use core::error; remove std feature
Switches from `std::error::Error` to `core::error::Error` which was stabilized in Rust 1.81, which is already the `cipher` crate's current MSRV. Since this was the only usage of `std`, also removes the `std` feature.
1 parent 5acedcd commit ec4bddf

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

.github/workflows/cipher.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,4 @@ jobs:
6969
- run: cargo test
7070
- run: cargo test --features block-padding
7171
- run: cargo test --features dev
72-
- run: cargo test --features std
7372
- run: cargo test --all-features

cipher/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ zeroize = { version = "1.8", optional = true, default-features = false }
2222

2323
[features]
2424
alloc = []
25-
std = ["alloc"]
2625
block-padding = ["inout/block-padding"]
2726
# Enable random key and IV generation methods
2827
rand_core = ["crypto-common/rand_core"]

cipher/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
#[cfg(all(feature = "block-padding", feature = "alloc"))]
2222
extern crate alloc;
23-
#[cfg(feature = "std")]
24-
extern crate std;
2523

2624
#[cfg(feature = "dev")]
2725
pub use blobby;

cipher/src/stream/errors.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ impl fmt::Display for StreamCipherError {
1717
}
1818
}
1919

20-
#[cfg(feature = "std")]
21-
impl std::error::Error for StreamCipherError {}
20+
impl core::error::Error for StreamCipherError {}
2221

2322
/// The error type returned when a cipher position can not be represented
2423
/// by the requested type.
@@ -37,5 +36,4 @@ impl From<OverflowError> for StreamCipherError {
3736
}
3837
}
3938

40-
#[cfg(feature = "std")]
41-
impl std::error::Error for OverflowError {}
39+
impl core::error::Error for OverflowError {}

0 commit comments

Comments
 (0)