mirror of
https://github.com/actix/actix-website
synced 2025-06-29 08:14:58 +02:00
use tuple
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user