mirror of
https://github.com/actix/actix-website
synced 2025-08-21 21:35:37 +02:00
use tuple
This commit is contained in:
@@ -257,8 +257,7 @@ struct Info {
|
|||||||
username: String,
|
username: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn index(data: (Path<(u32, String)>, Query<Info>)) -> String {
|
fn index((path, query): (Path<(u32, String)>, Query<Info>)) -> String {
|
||||||
let (path, query) = data;
|
|
||||||
format!("Welcome {}!", query.username)
|
format!("Welcome {}!", query.username)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user