mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
Use captured args in format string (#558)
This commit is contained in:
@ -41,7 +41,7 @@ async fn main() -> std::io::Result<()> {
|
||||
.wrap_fn(|sreq, srv| {
|
||||
let host = sreq.connection_info().host().to_owned();
|
||||
let uri = sreq.uri().to_owned();
|
||||
let url = format!("https://{}{}", host, uri);
|
||||
let url = format!("https://{host}{uri}");
|
||||
|
||||
// If the scheme is "https" then it will let other services below this wrap_fn
|
||||
// handle the request and if it's "http" then a response with redirect status code
|
||||
|
Reference in New Issue
Block a user