Type mismatch that I can't understand


#1

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"


#2

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.


#3

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


#4

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.