sasl: make docs.rs emit nice feature tags on feature-gated items
This commit is contained in:
parent
1293e9a3eb
commit
13be111de1
9 changed files with 21 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue