Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
) Depends on tokio-rs#2023 ## Motivation Currently, `FmtLayer` holds a `PhantomData<S>` with the `Subscriber` type it wraps. This is unfortunate because it means that the layer's auto traits such as `Send`, `Sync`, and `'static` (as well as `UnwindSafe`, `Unpin`, etc) depend on the `Subscriber` type's auto traits...but the layer will never actually _store_ a value of type `S`. While all `Subscriber` will be `Send + Sync + 'static` in practice, the `PhantomData` means that functions returning a boxed `FmtLayer` must unnecessarily bound the subscriber type parameter. ## Solution This commit changes the `PhantomData` to `PhantomData<fn(S)>`, solving the problem. Signed-off-by: Eliza Weisman <[email protected]>
- Loading branch information