Skip to content

Commit bd4d91d

Browse files
authored
Remove precise capture clause on collect method (#3336)
The changes in #3120 now let us remove the clause due to changes in ownership requirements.
1 parent 56f0b8c commit bd4d91d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/collector/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ use crate::model::prelude::*;
3434
/// .await;
3535
/// # }
3636
/// ```
37-
pub fn collect<T, F>(ctx: &Context, extractor: F) -> impl Stream<Item = T> + use<T, F>
38-
where
39-
T: Send + 'static,
40-
F: Fn(&Event) -> Option<T> + Send + Sync + 'static,
41-
{
37+
pub fn collect<T: Send + 'static>(
38+
ctx: &Context,
39+
extractor: impl Fn(&Event) -> Option<T> + Send + Sync + 'static,
40+
) -> impl Stream<Item = T> {
4241
let (sender, mut receiver) = tokio::sync::mpsc::unbounded_channel();
4342

4443
// Register an event callback in the shard. It's kept alive as long as we return `true`

0 commit comments

Comments
 (0)