Skip to content

Commit

Permalink
password-auth: fix is_hash_obsolete docs (#431)
Browse files Browse the repository at this point in the history
The "Returns" section was incorrectly documented
  • Loading branch information
tarcieri committed Jun 24, 2023
1 parent 2d45c3e commit 58975ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions password-auth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ pub fn verify_password(password: impl AsRef<[u8]>, hash: &str) -> Result<(), Err
/// to determine if such an update should be applied.
///
/// # Returns
/// - `true` if the hash can't be parsed or isn't using the latest
/// recommended parameters
/// - `false` if the hash is using the latest recommended parameters
/// - `Ok(true)` if the hash *isn't* using the latest recommended algorithm/parameters.
/// - `Ok(false)` if the hash *is* using the latest recommended algorithm/parameters.
/// - `Err(ParseError)` if the hash could not be parsed.
#[allow(unreachable_code)]
pub fn is_hash_obsolete(hash: &str) -> Result<bool, ParseError> {
let hash = PasswordHash::new(hash).map_err(ParseError::new)?;
Expand Down

0 comments on commit 58975ef

Please sign in to comment.