diff --git a/src/collection.rs b/src/collection.rs index f2daf8ad4..aeb6aad38 100644 --- a/src/collection.rs +++ b/src/collection.rs @@ -416,10 +416,10 @@ impl Collection where G::Timestamp: Da /// .inspect_batch(|t,xs| println!("errors @ {:?}: {:?}", t, xs)); /// }); /// ``` - pub fn inspect_batch(&self, func: F) -> Collection + pub fn inspect_batch(&self, mut func: F) -> Collection where F: FnMut(&G::Timestamp, &[(D, G::Timestamp, R)])+'static { self.inner - .inspect_batch(func) + .inspect_batch(move |time, data| func(time, data)) .as_collection() } /// Attaches a timely dataflow probe to the output of a Collection.