Skip to content

Instantly share code, notes, and snippets.

@apollo13
Created February 19, 2020 14:27
Show Gist options
  • Save apollo13/f38f75206ad61f66f8c2b4cbcd769d66 to your computer and use it in GitHub Desktop.
Save apollo13/f38f75206ad61f66f8c2b4cbcd769d66 to your computer and use it in GitHub Desktop.
error[E0308]: mismatched types
--> client/src/observer/connector.rs:77:9
|
66 | pub fn update_info(&self) -> std::result::Result<UpdateInfo, Box<dyn error::Error>> {
| ------------------------------------------------------ expected `std::result::Result<observer::connector::UpdateInfo, std::boxed::Box<(dyn std::error::Error + 'static)>>` because of return type
...
77 | / decode::<UpdateInfo>(
78 | | &token,
79 | | &DecodingKey::from_secret("secret".as_ref()),
80 | | &Validation::new(Algorithm::HS256),
81 | | )
82 | | .map(|t| t.claims)
| |__________________________^ expected struct `std::boxed::Box`, found struct `jsonwebtoken::errors::Error`
|
= note: expected enum `std::result::Result<_, std::boxed::Box<(dyn std::error::Error + 'static)>>`
found enum `std::result::Result<_, jsonwebtoken::errors::Error>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment