tomaka / rouille

Web framework in Rust
Apache License 2.0
1.09k stars 105 forks source link

post_input! wrong number of type arguments: expected 1, found 2 #156

Closed lolgesten closed 6 years ago

lolgesten commented 6 years ago

It's very possible I'm doing something wrong here.

I believe I'm following the docs/example code, but still I get something strange in the macro.

error[E0244]: wrong number of type arguments: expected 1, found 2
   --> src/main.rs:142:33
    |
142 |                       let input = post_input!(&request, {
    |  _________________________________^
143 | |                         descriptor: String
144 | |                     });
    | |______________________^ expected 1 type argument
    |
    = note: this error originates in a macro outside of the current crate

Should this work?

ALSchwalm commented 6 years ago

Just as a heads-up, this is caused by a bug in the post_input macro causing it to use the Result type from the enclosing scope instead of the standard Result. It was fixed in #161 so I think this issue can be closed.