Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mismatched type error, had to cargo update #1085

Closed
est31 opened this issue Nov 13, 2020 · 1 comment · Fixed by #1087
Closed

mismatched type error, had to cargo update #1085

est31 opened this issue Nov 13, 2020 · 1 comment · Fixed by #1087

Comments

@est31
Copy link
Contributor

est31 commented Nov 13, 2020

I got this error when I rebased #1058:

error[E0308]: mismatched types
   --> src/async_impl/request.rs:301:64
    |
301 |             let serializer = serde_urlencoded::Serializer::new(&mut pairs);
    |                                                                ^^^^^^^^^^ expected struct `form_urlencoded::Serializer`, found struct `url::form_urlencoded::Serializer`
    |
    = note: expected mutable reference `&mut form_urlencoded::Serializer<'_, _>`
               found mutable reference `&mut url::form_urlencoded::Serializer<'_, url::UrlQuery<'_>>`

error: aborting due to previous error

It was totally unrelated and likely you'd get it on master as well. I ran cargo update and the problem was resolved. Maybe something caused cargo to deunify dependencies? I'm filing this issue as others might run into it as well. Maybe some semver requirement is too broad? IDK. Anyways, this is the output of cargo update, maybe it's helpful:

$ cargo update
    Updating crates.io index
    Updating addr2line v0.13.0 -> v0.14.0
    Updating aho-corasick v0.7.14 -> v0.7.15
    Updating async-compression v0.3.5 -> v0.3.6
    Updating backtrace v0.3.53 -> v0.3.54
    Updating base-x v0.2.6 -> v0.2.8
    Updating cc v1.0.61 -> v1.0.62
    Updating const_fn v0.4.2 -> v0.4.3
    Updating cookie v0.14.2 -> v0.14.3
      Adding core-foundation v0.9.1
      Adding core-foundation-sys v0.8.2
    Updating crc32fast v1.2.0 -> v1.2.1
    Updating encoding_rs v0.8.24 -> v0.8.26
    Updating flate2 v1.0.18 -> v1.0.19
    Updating futures v0.3.6 -> v0.3.8
    Updating futures-channel v0.3.6 -> v0.3.8
    Updating futures-core v0.3.6 -> v0.3.8
    Updating futures-executor v0.3.6 -> v0.3.8
    Updating futures-io v0.3.6 -> v0.3.8
    Updating futures-macro v0.3.6 -> v0.3.8
    Updating futures-sink v0.3.6 -> v0.3.8
    Updating futures-task v0.3.6 -> v0.3.8
    Updating futures-util v0.3.6 -> v0.3.8
    Updating gimli v0.22.0 -> v0.23.0
    Updating h2 v0.2.6 -> v0.2.7
    Updating hyper v0.13.8 -> v0.13.9
    Updating libc v0.2.79 -> v0.2.80
    Updating libflate v1.0.2 -> v1.0.3
    Updating memchr v2.3.3 -> v2.3.4
    Updating native-tls v0.2.4 -> v0.2.6
    Updating object v0.21.1 -> v0.22.0
    Updating once_cell v1.4.1 -> v1.5.2
      Adding pin-project v1.0.1
      Adding pin-project-internal v1.0.1
    Updating pin-project-lite v0.1.10 -> v0.1.11
    Updating ppv-lite86 v0.2.9 -> v0.2.10
    Updating proc-macro-hack v0.5.18 -> v0.5.19
    Updating regex v1.4.1 -> v1.4.2
    Updating regex-syntax v0.6.20 -> v0.6.21
    Updating rustc-demangle v0.1.17 -> v0.1.18
    Updating security-framework v0.4.4 -> v2.0.0
    Updating security-framework-sys v0.4.3 -> v2.0.0
    Updating socket2 v0.3.15 -> v0.3.16
    Updating syn v1.0.44 -> v1.0.48
    Updating thiserror v1.0.21 -> v1.0.22
    Updating thiserror-impl v1.0.21 -> v1.0.22
    Updating tinyvec v0.3.4 -> v1.0.1
      Adding tinyvec_macros v0.1.0
    Updating tokio v0.2.22 -> v0.2.23
    Updating tokio-macros v0.2.5 -> v0.2.6
      Adding tracing-futures v0.2.4
    Updating unicode-normalization v0.1.13 -> v0.1.14
    Updating url v2.1.1 -> v2.2.0
@stevelr
Copy link
Contributor

stevelr commented Nov 13, 2020

I had this problem also with two other crates that had url = "2.1" in the crate dependencies. Changing to url = 2.2 fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants