Formatting

This commit is contained in:
Daniel García 2021-10-27 23:00:26 +02:00
parent 450c4d4d97
commit 9f393cfd9d
No known key found for this signature in database
GPG Key ID: FC8A7D14C3CD543A

View File

@ -32,11 +32,7 @@ impl WebauthnConfig {
let domain = CONFIG.domain(); let domain = CONFIG.domain();
let domain_origin = CONFIG.domain_origin(); let domain_origin = CONFIG.domain_origin();
Webauthn::new(Self { Webauthn::new(Self {
rpid: Url::parse(&domain) rpid: Url::parse(&domain).map(|u| u.domain().map(str::to_owned)).ok().flatten().unwrap_or_default(),
.map(|u| u.domain().map(str::to_owned))
.ok()
.flatten()
.unwrap_or_default(),
url: domain, url: domain,
origin: Url::parse(&domain_origin).unwrap(), origin: Url::parse(&domain_origin).unwrap(),
}) })