diff options
| author | Jokler <github@jokler.xyz> | 2026-10-05 16:07:20 +0200 |
|---|---|---|
| committer | Jokler <github@jokler.xyz> | 2026-10-05 22:25:43 +0200 |
| commit | 625ea9193202f678ab2799283ddfe2b282ba1e90 (patch) | |
| tree | ccb98fdfca95b0787b730d5e9a3d3c9146eabf9a /src/user.rs | |
| parent | 0fed68e150b028b9ad62e75e0472a34224042501 (diff) | |
| download | joklerpoints-625ea9193202f678ab2799283ddfe2b282ba1e90.tar.gz joklerpoints-625ea9193202f678ab2799283ddfe2b282ba1e90.zip | |
Add user creation
Diffstat (limited to 'src/user.rs')
| -rw-r--r-- | src/user.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/user.rs b/src/user.rs index 8cb2c5f..6ef4652 100644 --- a/src/user.rs +++ b/src/user.rs @@ -254,7 +254,7 @@ pub async fn confirm_transfer( header::LOCATION, format!( "/transfer?{}", - serde_urlencoded::to_string(query).unwrap_or(String::with_capacity(0)) + serde_urlencoded::to_string(query).unwrap_or_else(|_| String::with_capacity(0)) ), ) .finish(); @@ -272,7 +272,7 @@ pub async fn confirm_transfer( header::LOCATION, format!( "/transfer?{}", - serde_urlencoded::to_string(query).unwrap_or(String::with_capacity(0)) + serde_urlencoded::to_string(query).unwrap_or_else(|_| String::with_capacity(0)) ), ) .finish(); @@ -297,7 +297,7 @@ pub async fn confirm_transfer( header::LOCATION, format!( "/transfer?{}", - serde_urlencoded::to_string(query).unwrap_or(String::with_capacity(0)) + serde_urlencoded::to_string(query).unwrap_or_else(|_| String::with_capacity(0)) ), ) .finish(); @@ -343,7 +343,7 @@ impl Default for PasswordResult { pub async fn settings(ident: Identity, params: web::Query<PasswordQuery>) -> HttpResponse { if let Some(name) = ident.identity() { - ident.remember(name.clone()); + ident.remember(name); let query = params.into_inner(); HttpResponse::Ok().content_type("text/html").body( @@ -398,7 +398,7 @@ pub async fn reset_password( header::LOCATION, format!( "/settings?{}", - serde_urlencoded::to_string(query).unwrap_or(String::with_capacity(0)) + serde_urlencoded::to_string(query).unwrap_or_else(|_| String::with_capacity(0)) ), ) .finish(); @@ -422,7 +422,7 @@ pub async fn reset_password( header::LOCATION, format!( "/settings?{}", - serde_urlencoded::to_string(query).unwrap_or(String::with_capacity(0)) + serde_urlencoded::to_string(query).unwrap_or_else(|_| String::with_capacity(0)) ), ) .finish(); @@ -448,7 +448,7 @@ pub async fn reset_password( header::LOCATION, format!( "/settings?{}", - serde_urlencoded::to_string(query).unwrap_or(String::with_capacity(0)) + serde_urlencoded::to_string(query).unwrap_or_else(|_| String::with_capacity(0)) ), ) .finish() |
