Type mismatch that I can't understand

Hi!
I'm using iron and oven (cookie) library.
There is extension trait for Response with method "set_cookie".
It clearly uses cookie::Cookie in the library source.

But when I use it, it gives an error "(...) struct iron::header::Cookie, found struct cookie::Cookie"

https://github.com/flosse/oven/blob/master/src/lib.rs#L38

The reason for type mismatches when it's clearly the same library is usually a version mismatch. Make sure that you and Iron are using the same version of cookie.

A good way to debug this is to look at your Cargo.lock file (next to Cargo.toml).

1 Like

Thanks @ogeon & @stebalien ! That was the problem.
The good guys from the irc also helped. I was going to write the solution but you already expressed it better.