Skip to content

Commit 0d0fdbe

Browse files
authored
digest: use dep: for block-buffer and const-oid (#2302)
These were previously implicitly features, even though the actual features that activate them are `block-api` and `oid` respectively. This commit makes them just dependencies so they have no associated crate features except `block-api` and `oid`.
1 parent c1a51d4 commit 0d0fdbe

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

digest/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ sha2 = "0.11.0-rc.5"
2727

2828
[features]
2929
default = ["block-api"]
30-
block-api = ["block-buffer"] # Enable block API traits
30+
alloc = []
31+
block-api = ["dep:block-buffer"] # Enable block API traits
32+
dev = ["blobby"]
33+
getrandom = ["common/getrandom", "rand_core"]
3134
mac = ["dep:ctutils"] # Enable MAC traits
3235
rand_core = ["common/rand_core"] # Enable random key generation methods
33-
getrandom = ["common/getrandom", "rand_core"]
34-
oid = ["const-oid"]
36+
oid = ["dep:const-oid"]
3537
zeroize = ["dep:zeroize", "block-buffer?/zeroize"]
36-
alloc = []
37-
dev = ["blobby"]
3838

3939
[lints]
4040
workspace = true

digest/src/digest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use common::{Output, OutputSizeUser, typenum::Unsigned};
33

44
#[cfg(feature = "alloc")]
55
use alloc::boxed::Box;
6-
#[cfg(feature = "const-oid")]
6+
#[cfg(feature = "oid")]
77
use const_oid::DynAssociatedOid;
88

99
/// Marker trait for cryptographic hash functions.
@@ -231,8 +231,8 @@ impl Clone for Box<dyn DynDigest> {
231231
}
232232

233233
/// Convenience wrapper trait around [DynDigest] and [DynAssociatedOid].
234-
#[cfg(feature = "const-oid")]
234+
#[cfg(feature = "oid")]
235235
pub trait DynDigestWithOid: DynDigest + DynAssociatedOid {}
236236

237-
#[cfg(feature = "const-oid")]
237+
#[cfg(feature = "oid")]
238238
impl<T: DynDigest + DynAssociatedOid> DynDigestWithOid for T {}

digest/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub use common;
6363
#[cfg(feature = "oid")]
6464
pub use const_oid;
6565

66-
#[cfg(feature = "const-oid")]
66+
#[cfg(feature = "oid")]
6767
pub use crate::digest::DynDigestWithOid;
6868
pub use crate::digest::{Digest, DynDigest, HashMarker};
6969
#[cfg(feature = "mac")]

0 commit comments

Comments
 (0)