Skip to content

Commit 1548d2a

Browse files
authored
password-hash: add Error::OutOfMemory variant (#1782)
1 parent 27835aa commit 1548d2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

password-hash/src/errors.rs

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ pub enum Error {
6363

6464
/// Invalid algorithm version.
6565
Version,
66+
67+
/// Out of memory (heap allocation failure).
68+
OutOfMemory,
6669
}
6770

6871
impl fmt::Display for Error {
@@ -95,6 +98,7 @@ impl fmt::Display for Error {
9598
}
9699
Self::SaltInvalid(val_err) => write!(f, "salt invalid: {}", val_err),
97100
Self::Version => write!(f, "invalid algorithm version"),
101+
Self::OutOfMemory => write!(f, "out of memory"),
98102
}
99103
}
100104
}

0 commit comments

Comments
 (0)