From a4cfb4bf1a1b62a7fa0557f23509130cc4c1cf73 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Wed, 1 Nov 2023 15:23:00 -0400 Subject: [PATCH] Collection does not depend directly on TimelyContainer Signed-off-by: Moritz Hoffmann --- src/collection.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/collection.rs b/src/collection.rs index 27631c0b9..e55532db5 100644 --- a/src/collection.rs +++ b/src/collection.rs @@ -9,6 +9,7 @@ //! implementations, and to support efficient incremental updates to the collections. use std::hash::Hash; +use std::marker::PhantomData; use timely::Data; use timely::progress::Timestamp; @@ -45,13 +46,14 @@ pub struct Collection::Timestamp where G: Scope, R: Semigroup, - C: TimelyContainer, { /// The underlying timely dataflow stream. /// /// This field is exposed to support direct timely dataflow manipulation when required, but it is /// not intended to be the idiomatic way to work with the collection. - pub inner: StreamCore + pub inner: StreamCore, + /// Phantom data to consume type parameters. + pub _phantom: PhantomData<(*const D, *const R)>, } impl Collection @@ -65,7 +67,7 @@ impl Collection /// provides a `new_collection` method which will create a new collection for you without exposing /// the underlying timely stream at all. pub fn new(stream: StreamCore) -> Collection { - Self { inner: stream } + Self { inner: stream, _phantom: PhantomData } } /// Creates a new collection accumulating the contents of the two collections.