1
0
mirror of https://github.com/actix/actix-website synced 2025-01-22 16:15:56 +01:00

use tuple

This commit is contained in:
Nikolay Kim 2018-06-01 10:53:53 -07:00
parent 0b003828b3
commit 259a2ac6f1

View File

@ -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)
}