Skip to content

Commit 4c3db2f

Browse files
committed
Remove ContainerBuilder::partition
Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent 7949af8 commit 4c3db2f

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

container/src/lib.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,6 @@ pub trait ContainerBuilder: Default + 'static {
107107
/// be called repeatedly until it returns `None`.
108108
#[must_use]
109109
fn finish(&mut self) -> Option<&mut Self::Container>;
110-
/// Partitions `container` among `builders`, using the function `index` to direct items.
111-
fn partition<I>(container: &mut Self::Container, builders: &mut [Self], mut index: I)
112-
where
113-
Self::Container: DrainContainer,
114-
Self: for<'a> PushInto<<Self::Container as DrainContainer>::Item<'a>>,
115-
I: for<'a> FnMut(&<Self::Container as DrainContainer>::Item<'a>) -> usize,
116-
{
117-
for datum in container.drain() {
118-
let index = index(&datum);
119-
builders[index].push_into(datum);
120-
}
121-
}
122-
123110
/// Indicates a good moment to release resources.
124111
///
125112
/// By default, does nothing. Callers first needs to drain the contents using [`Self::finish`]

0 commit comments

Comments
 (0)