Skip to content

Commit

Permalink
Remove free function get
Browse files Browse the repository at this point in the history
A `use itertools::*;` might conflict with such a general function name.
  • Loading branch information
Philippe-Cholet committed May 14, 2024
1 parent 0ac556c commit 3f49188
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/iter_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<I>: private_iter_index::Sealed
where
Expand All @@ -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;
}
Expand Down Expand Up @@ -107,9 +107,6 @@ where
}
}

/// Returns an iterator over a subsection of the iterator.
///
/// See [`Itertools::get`] for more information.
pub fn get<I, R>(iter: I, index: R) -> R::Output
where
I: IntoIterator,
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3f49188

Please sign in to comment.