mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
Use captured args in format string (#558)
This commit is contained in:
@ -90,7 +90,7 @@ pub async fn gen_tls_cert(user_email: &str, user_domain: &str) -> anyhow::Result
|
||||
let proof = chall.http_proof()?;
|
||||
|
||||
// Place the file/contents in the correct place.
|
||||
let path = format!("acme-challenge/{}", token);
|
||||
let path = format!("acme-challenge/{token}");
|
||||
fs::write(&path, &proof)?;
|
||||
|
||||
// After the file is accessible from the web, the calls
|
||||
|
@ -5,7 +5,7 @@ use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};
|
||||
|
||||
/// simple handle
|
||||
async fn index(req: HttpRequest) -> Result<HttpResponse, Error> {
|
||||
println!("{:?}", req);
|
||||
println!("{req:?}");
|
||||
Ok(HttpResponse::Ok()
|
||||
.content_type("text/plain")
|
||||
.body("Welcome!"))
|
||||
|
@ -11,7 +11,7 @@ use rustls_pemfile::{certs, pkcs8_private_keys};
|
||||
|
||||
/// simple handle
|
||||
async fn index(req: HttpRequest) -> HttpResponse {
|
||||
debug!("{:?}", req);
|
||||
debug!("{req:?}");
|
||||
|
||||
HttpResponse::Ok().content_type(ContentType::html()).body(
|
||||
"<!DOCTYPE html><html><body>\
|
||||
|
Reference in New Issue
Block a user