summaryrefslogtreecommitdiffstats
path: root/src/user.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/user.rs')
-rw-r--r--src/user.rs14
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()