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

v0.11.4 compile error wasm target #1295

Closed
Saruniks opened this issue Jun 26, 2021 · 1 comment · Fixed by #1296
Closed

v0.11.4 compile error wasm target #1295

Saruniks opened this issue Jun 26, 2021 · 1 comment · Fixed by #1296
Labels
C-bug Category: bug. Something is wrong. This is bad! E-easy Effort: Easy! Start here :D

Comments

@Saruniks
Copy link
Contributor

Saruniks commented Jun 26, 2021

I get compile error if trying to use reqwest v0.11.4. Build succeeds with reqwest v0.11.3.

error[E0277]: the trait bound Form: Clone is not satisfied
--> /home/test/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.11.4/src/wasm/body.rs:24:15
|
24 | Multipart(Form),
| ^^^^ the trait Clone is not implemented for Form
|
= note: required by clone
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

Cargo.toml

[dependencies.reqwest] version = "=0.11.4" default-features = true features = ["json", "multipart"]

Reproduced with rustc versions:
rustc 1.55.0-nightly (e6b4c252e 2021-06-25)
rustc 1.53.0 (53cb7b09b 2021-06-17)

Build command:
cargo build --target wasm32-unknown-unknown

@seanmonstar
Copy link
Owner

Ah yikes, thanks for the report! It's probably this line that was recently added. We should remove that derive, and change that clone method to a try_clone that matches on the inner type.

Do you want to try to make a PR with that fix?

@seanmonstar seanmonstar added C-bug Category: bug. Something is wrong. This is bad! E-easy Effort: Easy! Start here :D labels Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug. Something is wrong. This is bad! E-easy Effort: Easy! Start here :D
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants