I'm using Hyper on the server side:
//"req" is hyper::server::Request
match req.headers().iter().collect().filter(|x| x.name() == "field123").first() {
Some(...) => ...........
}
Error:
error[E0619]: the type of this value must be known in this context
--> src/main.rs:123:31
|
123 | match req.headers().iter().collect().filter(|x| x.name() == "field123").first() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What "value" exactly? Why does the error occur?
How to fix it?