Skip to content

Commit

Permalink
fix: redundant pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
nosduco committed Aug 7, 2023
1 parent 8549154 commit 034c006
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ impl Config {
let cookie_domain: String = match env::var("COOKIE_DOMAIN") {
Ok(value) => value,
Err(..) => {
if let Some(..) = host {
host.unwrap()
.get(0)
if host.is_some() {
host.and_then(|h| h.get(0))
.map_or(auth_host.clone().as_str(), |m| m.as_str())
.to_string()
} else {
Expand Down

0 comments on commit 034c006

Please sign in to comment.