1
0
mirror of https://github.com/actix/examples synced 2025-06-28 18:00:37 +02:00

clean up rustls example

This commit is contained in:
Rob Ede
2022-03-15 18:17:19 +00:00
parent c9ebeacf58
commit 4f1881d1a3
5 changed files with 97 additions and 40 deletions

View File

@ -81,7 +81,7 @@ pub async fn gen_tls_cert(user_email: &str, user_domain: &str) -> anyhow::Result
// http://mydomain.io/.well-known/acme-challenge/<token>
let chall = auths[0]
.http_challenge()
.ok_or(anyhow!("no HTTP challenge accessible"))?;
.ok_or_else(|| anyhow!("no HTTP challenge accessible"))?;
// The token is the filename.
let token = chall.http_token();