From 5e151ec9173adbbeed4d78c85c7e64f3e71c36c7 Mon Sep 17 00:00:00 2001 From: Philippe-Cholet <44676486+Philippe-Cholet@users.noreply.github.com> Date: Fri, 3 May 2024 07:50:15 +0200 Subject: [PATCH] Remove free function `get` A `use itertools::*;` might conflict with such a general function name. --- src/iter_index.rs | 7 ++----- src/lib.rs | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/iter_index.rs b/src/iter_index.rs index cf3222c9d..aadaa72a7 100644 --- a/src/iter_index.rs +++ b/src/iter_index.rs @@ -17,7 +17,7 @@ mod private_iter_index { impl Sealed for ops::RangeFull {} } -/// Used by [`get`] and [`Itertools::get`] to know which iterator +/// Used by [`Itertools::get`] to know which iterator /// to turn different ranges into. pub trait IteratorIndex: private_iter_index::Sealed where @@ -28,7 +28,7 @@ where /// Returns an adapted iterator for the current index. /// - /// Prefer calling [`get`] or [`Itertools::get`] instead + /// Prefer calling [`Itertools::get`] instead /// of calling this directly. fn index(self, from: I) -> Self::Output; } @@ -107,9 +107,6 @@ where } } -/// Returns an iterator over a subsection of the iterator. -/// -/// See [`Itertools::get`] for more information. pub fn get(iter: I, index: R) -> R::Output where I: IntoIterator, diff --git a/src/lib.rs b/src/lib.rs index 786c0cc4d..c439fcfef 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -154,7 +154,6 @@ pub use crate::concat_impl::concat; pub use crate::cons_tuples_impl::cons_tuples; pub use crate::diff::diff_with; pub use crate::diff::Diff; -pub use crate::iter_index::get; #[cfg(feature = "use_alloc")] pub use crate::kmerge_impl::kmerge_by; pub use crate::minmax::MinMaxResult;