Skip to content

Commit

Permalink
rename slice_ext to slice_chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
ngtkana committed Dec 13, 2024
1 parent c60ba8b commit e42e91b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions libs/riff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod bitmask_iterators;
mod bitmask_operations;
mod change_min_max;
mod numeric_traits;
mod pop_if;
mod slice_chunks;
mod slice_ext;

pub use binary_search::BinarySearch;
Expand All @@ -14,5 +14,5 @@ pub use bitmask_iterators::bitmask_subsets;
pub use bitmask_operations::i2powm1;
pub use change_min_max::ChangeMinMax;
pub use numeric_traits::Unsigned;
pub use pop_if::PopIf;
pub use slice_ext::SliceExt;
pub use slice_chunks::PopIf;
pub use slice_ext::SliceChunks;
File renamed without changes.
4 changes: 2 additions & 2 deletions libs/riff/src/slice_ext.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/// A trait for slices.
pub trait SliceExt {
pub trait SliceChunks {
type Item;
/// Groups adjacent elements by a predicate.
/// (Rust 1.77.0)
fn chunk_by<F>(&self, f: F) -> SliceChunkBy<'_, Self::Item, F>
where
F: FnMut(&Self::Item, &Self::Item) -> bool;
}
impl<T> SliceExt for [T] {
impl<T> SliceChunks for [T] {
type Item = T;

fn chunk_by<F>(&self, f: F) -> SliceChunkBy<'_, Self::Item, F>
Expand Down

0 comments on commit e42e91b

Please sign in to comment.