-
Notifications
You must be signed in to change notification settings - Fork 612
Description
Related Problems?
The opentelemetry::context::future_ext::FutureExt extension trait has a blanket implementation that is overly general:
impl<T: Sized> FutureExt for T {}This is a code smell.
This blanket-impl was likely made because WithContext implements Future, Stream and Sink, depending on what type is wrapped, and while it works, it also means that i32 implements FutureExt.
Describe the solution you'd like:
Introduce three separate traits providing a with_context extension method for Future, Stream, and Sink separately.
Considered Alternatives
Don't import FutureExt and just make my own extension trait.
Additional Context
In a future release, after an appropriate deprecation period, the FutureExt trait can be entirely removed.
Tip
React with π to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.