Closed gerob311 closed 1 year ago
Both of those imports definitely exist: https://docs.rs/futures-util/latest/src/futures_util/lib.rs.html#300. Are you sure you aren't using a patched version of futures-util?
Not that I'm aware of. Here's my dependencies list:
[dependencies]
chrono = { version = "0.4.22", features = ["serde"] }
chrono-tz = { version = "0.6.3", features = ["serde"] }
serde = { version = "~1.0", features = ["derive"] }
serde_json = { version = "~1.0.59", features = ["raw_value"] }
log = "~0.4.11"
simple_logger = "~2.3.0"
postgres = "0.19.4"
postgres-types = { version = "0.2.4", features = ["derive"] }
r2d2 = "~0.8.10"
r2d2_postgres = "~0.18.1"
rocket = { version = "0.5.0-rc.2", features = ["json"] }
I've tried commenting out every dependency except postgres = "0.19.4"
, and running cargo clean
then cargo build
, and I'm still getting the same problem. I'm not sure what else to try.
In case it helps, I'm using rustc 1.64.0, and I'm using the 2018 rust edition.
Looking at the link you posted, does Stream
need to be imported as stream::Stream
? That might be naive of me, I'm still not confident with Rust's import usage.
You could try deleting your Cargo cache to see if the source of the futures_util crate was modified or corrupted locally.
I have now tried deleting my Cargo cache, and I am getting the same problem, when postgres = "0.19.4
is my only dependency. Does that mean it needs to be fixed on crates.io?
I cannot reproduce your issue locally. It is highly unlikely that anything needs to be fixed on crates.io.
I've just hit this. The problem is that tokio-postgres says it depends on 0.3 of futures-util but in some 0.3.x versions (e.g. 0.3.13) it's not present.
Setting the minimum to 0.3.14 seems to fix things though
I'm using rust-postgres as a dependency for my project, and I'm getting the following error when I build my project.
There seems to be similar problems with the case of imports of Stream and Future in
I'd expect that a released crate would build so, what might I be doing wrong?