sasl: make docs.rs emit nice feature tags on feature-gated items

This commit is contained in:
Jonas Schäfer 2024-04-20 09:13:03 +02:00
commit 13be111de1
9 changed files with 21 additions and 0 deletions

View file

@ -5,6 +5,7 @@ use getrandom::Error as RngError;
#[derive(Debug)]
pub enum Error {
#[cfg(feature = "scram")]
#[cfg_attr(docsrs, doc(cfg(feature = "scram")))]
/// An error while initializing the Rng.
RngError(RngError),
/// An error in a SASL mechanism.
@ -12,6 +13,7 @@ pub enum Error {
}
#[cfg(feature = "scram")]
#[cfg_attr(docsrs, doc(cfg(feature = "scram")))]
impl From<RngError> for Error {
fn from(err: RngError) -> Error {
Error::RngError(err)