Hi,
I am new in Rust, trying to export #![feature(slice_group_by)] method into a separate helper but have a problem with implementing trait for [T] slice.
I appreciate any directions.
pub trait MyTrait<T> { fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>; } impl<'a, T> MyTrait<T> for std::slice::[T]<'a, T> { fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F> where F: FnMut(&T, &T) -> bool, { GroupBy::new(self, pred) } }