mirror of
https://github.com/actix/actix-website
synced 2025-01-22 16:15:56 +01:00
use tuple
This commit is contained in:
parent
0b003828b3
commit
259a2ac6f1
@ -257,8 +257,7 @@ struct Info {
|
||||
username: String,
|
||||
}
|
||||
|
||||
fn index(data: (Path<(u32, String)>, Query<Info>)) -> String {
|
||||
let (path, query) = data;
|
||||
fn index((path, query): (Path<(u32, String)>, Query<Info>)) -> String {
|
||||
format!("Welcome {}!", query.username)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user