aboutsummaryrefslogtreecommitdiff
path: root/src/mail.rs
diff options
context:
space:
mode:
authorMathijs van Veluw <[email protected]>2024-12-14 00:55:34 +0100
committerGitHub <[email protected]>2024-12-14 00:55:34 +0100
commit9cd400db6c5da858a4f49eb883469cbd6cb7337d (patch)
tree1c1d1900c1e1ba20da64e4c2052285b2d81317e8 /src/mail.rs
parentfd512300448995735961cbeedcbe4b684be1c5fd (diff)
downloadvaultwarden-9cd400db6c5da858a4f49eb883469cbd6cb7337d.tar.gz
vaultwarden-9cd400db6c5da858a4f49eb883469cbd6cb7337d.zip
Some refactoring and optimizations (#5291)
- Refactored several code to use more modern syntax - Made some checks a bit more strict - Updated crates Signed-off-by: BlackDex <[email protected]>
Diffstat (limited to 'src/mail.rs')
-rw-r--r--src/mail.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mail.rs b/src/mail.rs
index 5ce4a079..1a32ae25 100644
--- a/src/mail.rs
+++ b/src/mail.rs
@@ -286,9 +286,8 @@ pub async fn send_invite(
}
}
- let query_string = match query.query() {
- None => err!("Failed to build invite URL query parameters"),
- Some(query) => query,
+ let Some(query_string) = query.query() else {
+ err!("Failed to build invite URL query parameters")
};
let (subject, body_html, body_text) = get_text(
@@ -330,9 +329,8 @@ pub async fn send_emergency_access_invite(
.append_pair("token", &encode_jwt(&claims));
}
- let query_string = match query.query() {
- None => err!("Failed to build emergency invite URL query parameters"),
- Some(query) => query,
+ let Some(query_string) = query.query() else {
+ err!("Failed to build emergency invite URL query parameters")
};
let (subject, body_html, body_text) = get_text(