mirror of
https://github.com/lldap/lldap.git
synced 2026-04-05 14:48:10 +00:00
Use unwrap_or logic for greeting instead of match statement
Co-authored-by: nitnelave <796633+nitnelave@users.noreply.github.com>
This commit is contained in:
@@ -93,10 +93,7 @@ pub async fn send_password_reset_email(
|
||||
.path_segments_mut()
|
||||
.unwrap()
|
||||
.extend(["reset-password", "step2", token]);
|
||||
let greeting = match display_name {
|
||||
Some(name) if !name.is_empty() => format!("Hello {name},"),
|
||||
_ => format!("Hello {username},"),
|
||||
};
|
||||
let greeting = format!("Hello {},", display_name.unwrap_or(username));
|
||||
|
||||
let body = format!(
|
||||
"{greeting}
|
||||
|
||||
Reference in New Issue
Block a user