Fix failing doc test

This commit is contained in:
Eric Zhang 2022-04-08 04:16:39 -04:00
parent d5089cab2a
commit e84bd34bd9
1 changed files with 3 additions and 3 deletions

View File

@ -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 {