Small change
This commit is contained in:
		| @@ -65,7 +65,7 @@ impl HashedBytes { | ||||
|     /// Hashes the bytes | ||||
|     #[must_use] | ||||
|     pub fn hash_bytes(bytes: &[u8]) -> Self { | ||||
|         let mut salt = [0; 64]; | ||||
|         let mut salt = [0; SALT_LENGTH]; | ||||
|         OsRng.fill_bytes(&mut salt); | ||||
|         Self { | ||||
|             hash: hash_scrypt(bytes, &salt), | ||||
|   | ||||
| @@ -92,9 +92,10 @@ pub trait ItemNotFoundExt<T> { | ||||
|  | ||||
| impl<T> ItemNotFoundExt<T> for Option<T> { | ||||
|     fn item_not_found(self) -> GeneralResult<T> { | ||||
|         const ITEM_NOT_FOUND_ERROR: GeneralError = | ||||
|             GeneralError::const_message(StatusCode::NOT_FOUND, "Item not found"); | ||||
|         self.ok_or(ITEM_NOT_FOUND_ERROR) | ||||
|         self.ok_or(GeneralError::const_message( | ||||
|             StatusCode::NOT_FOUND, | ||||
|             "Item not found", | ||||
|         )) | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user