We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
collect
1 parent 56f0b8c commit bd4d91dCopy full SHA for bd4d91d
src/collector/mod.rs
@@ -34,11 +34,10 @@ use crate::model::prelude::*;
34
/// .await;
35
/// # }
36
/// ```
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
-{
+pub fn collect<T: Send + 'static>(
+ ctx: &Context,
+ extractor: impl Fn(&Event) -> Option<T> + Send + Sync + 'static,
+) -> impl Stream<Item = T> {
42
let (sender, mut receiver) = tokio::sync::mpsc::unbounded_channel();
43
44
// Register an event callback in the shard. It's kept alive as long as we return `true`
0 commit comments