mirror of
https://github.com/actix/actix-website
synced 2024-11-24 00:41:07 +01:00
use tuple for multiple extractors
This commit is contained in:
parent
259a2ac6f1
commit
790afd3fb7
@ -22,7 +22,7 @@ function.
|
||||
```rust
|
||||
|
||||
// Option 1: passed as a parameter to a handler function
|
||||
fn index(params: Path<(String, String,)>, info: Json<MyInfo>) -> HttpResponse {
|
||||
fn index((params, info): (Path<(String, String,)>, Json<MyInfo>)) -> HttpResponse {
|
||||
...
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user