prisma / tiberius

TDS 7.2+ (Microsoft SQL Server) driver for Rust
Apache License 2.0
321 stars 118 forks source link

Reduce futures crate dependency footprint #270

Closed r-ml closed 1 year ago

r-ml commented 1 year ago

From the commit message:

The `futures` crate includes 2 modules that we don't use that incur in
more dependencies than strictly necessary: `channel` and `executor`.
`executor` depends on `futures-executor` and is gated behind a feature
enabled by default, easy to turn off;
`channel` depends on `futures-channel` and it's not optional.

Currently we already depend on the `futures-util` crate. All traits we
use the futures crate for are also included in it.

Refactor imports to pull trait definitions and impls from `futures-util`
and drop `futures` crate from the dependency tree.
r-ml commented 1 year ago

At first I tried to disable default features, but that kept futures-channel as a dependency, which is not used. So I ended up dropping the futures crate entirely, as futures-util covers our use case.