isolate scram behind a compilation feature
This commit is contained in:
parent
4b9f2376af
commit
a8f8744e21
6 changed files with 25 additions and 2 deletions
|
|
@ -1,14 +1,17 @@
|
|||
#[cfg(feature = "scram")]
|
||||
use openssl::error::ErrorStack;
|
||||
|
||||
/// A wrapper enum for things that could go wrong in this crate.
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
#[cfg(feature = "scram")]
|
||||
/// An error in OpenSSL.
|
||||
OpenSslErrorStack(ErrorStack),
|
||||
/// An error in a SASL mechanism.
|
||||
SaslError(String),
|
||||
}
|
||||
|
||||
#[cfg(feature = "scram")]
|
||||
impl From<ErrorStack> for Error {
|
||||
fn from(err: ErrorStack) -> Error {
|
||||
Error::OpenSslErrorStack(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue