rust icon indicating copy to clipboard operation
rust copied to clipboard

the `?` operator can only be applied to values that implement `Try`

Open 3JIou-home opened this issue 2 years ago • 1 comments

Hi, looks like you have problem in your code:

error[E0277]: the `?` operator can only be applied to values that implement `Try`
  --> /home/batman/.cargo/registry/src/github.com-1ecc6299db9ec823/danger-0.1.0/src/bin/update_types.rs:17:18
   |
17 |   let mut resp = reqwest::get(url)?;
   |                  ^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `impl Future<Output = Result<Response, reqwest::Error>>`
   |
   = help: the trait `Try` is not implemented for `impl Future<Output = Result<Response, reqwest::Error>>`

For more information about this error, try `rustc --explain E0277`.`

3JIou-home avatar Dec 15 '22 05:12 3JIou-home

:+1: You're welcome to look into it

orta avatar Dec 15 '22 07:12 orta