diff --git a/sentry-tower/src/lib.rs b/sentry-tower/src/lib.rs index 4cd9818d..71fb05e8 100644 --- a/sentry-tower/src/lib.rs +++ b/sentry-tower/src/lib.rs @@ -196,7 +196,9 @@ where H: Into>, { provider: P, - _hub: PhantomData<(H, Request)>, + // `fn` is used to assert that SentryLayer will be Send+Sync + // (https://doc.rust-lang.org/nomicon/phantom-data.html#table-of-phantomdata-patterns) + _hub: PhantomData, } impl Layer for SentryLayer @@ -250,7 +252,9 @@ where { service: S, provider: P, - _hub: PhantomData<(H, Request)>, + // `fn` is used to assert that SentryService will be Send+Sync + // (https://doc.rust-lang.org/nomicon/phantom-data.html#table-of-phantomdata-patterns) + _hub: PhantomData, } impl Service for SentryService