mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
clippy
This commit is contained in:
@ -5,7 +5,7 @@ lazy_static::lazy_static! {
|
||||
pub static ref SECRET_KEY: String = std::env::var("SECRET_KEY").unwrap_or_else(|_| "0123".repeat(8));
|
||||
}
|
||||
|
||||
const SALT: &'static [u8] = b"supersecuresalt";
|
||||
const SALT: &[u8] = b"supersecuresalt";
|
||||
|
||||
// WARNING THIS IS ONLY FOR DEMO PLEASE DO MORE RESEARCH FOR PRODUCTION USE
|
||||
pub fn hash_password(password: &str) -> Result<String, ServiceError> {
|
||||
@ -13,7 +13,7 @@ pub fn hash_password(password: &str) -> Result<String, ServiceError> {
|
||||
secret: SECRET_KEY.as_bytes(),
|
||||
..Default::default()
|
||||
};
|
||||
argon2::hash_encoded(password.as_bytes(), &SALT, &config).map_err(|err| {
|
||||
argon2::hash_encoded(password.as_bytes(), SALT, &config).map_err(|err| {
|
||||
dbg!(err);
|
||||
ServiceError::InternalServerError
|
||||
})
|
||||
|
Reference in New Issue
Block a user