From a2fd72dfb9ec02b7bdd628bd42dbf41152303f91 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 14 Aug 2023 17:21:45 +0700 Subject: [PATCH] `split_at` is only used by Rayon code. This fixes an unused code warning. Since the code is `pub(crate)`, it was only available within the crate and only used by Rayon code, so it is no functional change to not compile it except when the right feature is enabled. Also, fix a minor typo in some non-doc comments. --- src/base/iter.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base/iter.rs b/src/base/iter.rs index ebffdb07..c2b1f58a 100644 --- a/src/base/iter.rs +++ b/src/base/iter.rs @@ -313,8 +313,9 @@ impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorage> ColumnIter<'a, T, R, C, } } + #[cfg(feature = "rayon")] 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 left_iter = ColumnIter { @@ -401,8 +402,9 @@ impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut> ColumnIterMut<'a, T, } } + #[cfg(feature = "rayon")] 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 left_iter = ColumnIterMut {