Remove manual doc_cfg feature because we have doc_auto_cfg

This commit is contained in:
xmppftw xmppftw 2024-08-04 22:52:28 +02:00
commit 2103ef0191
10 changed files with 1 additions and 28 deletions

View file

@ -36,7 +36,6 @@ pub trait Validator<S: Secret> {
pub enum ProviderError {
AuthenticationFailed,
#[cfg(feature = "scram")]
#[cfg_attr(docsrs, doc(cfg(feature = "scram")))]
DeriveError(DeriveError),
}
@ -66,10 +65,8 @@ pub enum MechanismError {
CannotDecodeResponse,
#[cfg(feature = "scram")]
#[cfg_attr(docsrs, doc(cfg(feature = "scram")))]
InvalidKeyLength(hmac::digest::InvalidLength),
#[cfg(any(feature = "scram", feature = "anonymous"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "scram", feature = "anonymous"))))]
RandomFailure(getrandom::Error),
NoProof,
CannotDecodeProof,
@ -78,7 +75,6 @@ pub enum MechanismError {
}
#[cfg(feature = "scram")]
#[cfg_attr(docsrs, doc(cfg(feature = "scram")))]
impl From<DeriveError> for ProviderError {
fn from(err: DeriveError) -> ProviderError {
ProviderError::DeriveError(err)
@ -104,7 +100,6 @@ impl From<ValidatorError> for MechanismError {
}
#[cfg(feature = "scram")]
#[cfg_attr(docsrs, doc(cfg(feature = "scram")))]
impl From<hmac::digest::InvalidLength> for MechanismError {
fn from(err: hmac::digest::InvalidLength) -> MechanismError {
MechanismError::InvalidKeyLength(err)
@ -112,7 +107,6 @@ impl From<hmac::digest::InvalidLength> for MechanismError {
}
#[cfg(any(feature = "scram", feature = "anonymous"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "scram", feature = "anonymous"))))]
impl From<getrandom::Error> for MechanismError {
fn from(err: getrandom::Error) -> MechanismError {
MechanismError::RandomFailure(err)