Skip to content

Commit

Permalink
password-hash: add Error::OutOfMemory variant (#1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov authored Mar 5, 2025
1 parent 27835aa commit 1548d2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions password-hash/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ pub enum Error {

/// Invalid algorithm version.
Version,

/// Out of memory (heap allocation failure).
OutOfMemory,
}

impl fmt::Display for Error {
Expand Down Expand Up @@ -95,6 +98,7 @@ impl fmt::Display for Error {
}
Self::SaltInvalid(val_err) => write!(f, "salt invalid: {}", val_err),
Self::Version => write!(f, "invalid algorithm version"),
Self::OutOfMemory => write!(f, "out of memory"),
}
}
}
Expand Down

0 comments on commit 1548d2a

Please sign in to comment.