Skip to content

Commit

Permalink
Just use unwrap or default
Browse files Browse the repository at this point in the history
  • Loading branch information
tapnisu committed Mar 9, 2024
1 parent b73e42c commit 4611635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn format_embed(embed: &Embed) -> String {
format!(
"[{}]({})\n",
title.escape_markdown_v2(),
embed.url.to_owned().unwrap_or_else(|| "".to_string())
embed.url.to_owned().unwrap_or_default()
)
});

Expand Down

0 comments on commit 4611635

Please sign in to comment.