error[E0308]: mismatched types
--> src\routes\login\post.rs:44:5
|
44 | / Ok(HttpResponse::SeeOther()
45 | | .insert_header((LOCATION, "/"))
46 | | .finish())
| |__________________^ expected `Result<HttpResponse, LoginError>`, found `Result<HttpResponse, Error>`
|
= note: expected enum `Result<_, LoginError>`
found enum `Result<_, anyhow::Error>`
note: return type inferred to be `Result<HttpResponse, LoginError>` here
--> src\routes\login\post.rs:24:6
|
24 | ) -> Result<HttpResponse, LoginError> {
| ^^^^^^
help: use `?` to coerce and return an appropriate `Err`, and wrap the resulting value in `Ok` so the expression remains of type `Result`
|
44 ~ Ok(Ok(HttpResponse::SeeOther()
45 | .insert_header((LOCATION, "/"))
46 ~ .finish())?)
|
For more information about this error, try `rustc --explain E0308`.
error: could not compile `zero2prod` (lib) due to 1 previous error
Hi,
I am following the book and coding with it.
After section 10.6.3.2, cargo check fails with
my repo: https://github.com/arindamchoudhury/zero2prod
Thanks in advance.