Merge pull request #1277 from waywardmonkeys/unused-split

`split_at` is only used by Rayon code.
This commit is contained in:
Andreas Borgen Longva 2023-08-15 09:18:54 +02:00 committed by GitHub
commit 02260161b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -313,8 +313,9 @@ impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorage<T, R, C>> ColumnIter<'a, T, R, C,
} }
} }
#[cfg(feature = "rayon")]
pub(crate) fn split_at(self, index: usize) -> (Self, Self) { pub(crate) fn split_at(self, index: usize) -> (Self, Self) {
// SAFETY: this makes sur the generated ranges are valid. // SAFETY: this makes sure the generated ranges are valid.
let split_pos = (self.range.start + index).min(self.range.end); let split_pos = (self.range.start + index).min(self.range.end);
let left_iter = ColumnIter { let left_iter = ColumnIter {
@ -401,8 +402,9 @@ impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut<T, R, C>> ColumnIterMut<'a, T,
} }
} }
#[cfg(feature = "rayon")]
pub(crate) fn split_at(self, index: usize) -> (Self, Self) { pub(crate) fn split_at(self, index: usize) -> (Self, Self) {
// SAFETY: this makes sur the generated ranges are valid. // SAFETY: this makes sure the generated ranges are valid.
let split_pos = (self.range.start + index).min(self.range.end); let split_pos = (self.range.start + index).min(self.range.end);
let left_iter = ColumnIterMut { let left_iter = ColumnIterMut {