mirror of https://github.com/ekzhang/bore.git
Fix failing doc test
This commit is contained in:
parent
d5089cab2a
commit
e84bd34bd9
|
@ -28,13 +28,13 @@ impl Authenticator {
|
||||||
/// Validate a reply to a challenge.
|
/// Validate a reply to a challenge.
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// use uuid:Uuid;
|
/// use bore_cli::auth::Authenticator;
|
||||||
/// use crate::auth::Authenticator;
|
/// use uuid::Uuid;
|
||||||
///
|
///
|
||||||
/// let auth = Authenticator::new("secret");
|
/// let auth = Authenticator::new("secret");
|
||||||
/// let challenge = Uuid::new_v4();
|
/// let challenge = Uuid::new_v4();
|
||||||
///
|
///
|
||||||
/// assert!(auth.validate(&challenge, auth.answer(&challenge)));
|
/// assert!(auth.validate(&challenge, &auth.answer(&challenge)));
|
||||||
/// assert!(!auth.validate(&challenge, "wrong answer"));
|
/// assert!(!auth.validate(&challenge, "wrong answer"));
|
||||||
/// ```
|
/// ```
|
||||||
pub fn validate(&self, challenge: &Uuid, tag: &str) -> bool {
|
pub fn validate(&self, challenge: &Uuid, tag: &str) -> bool {
|
||||||
|
|
Loading…
Reference in New Issue