Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Ockajak committed Jul 10, 2024
1 parent b9b8f9d commit c65677c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
19 changes: 12 additions & 7 deletions src/extensions/collectible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {
/// Creates a collection from the original collection without
/// the first occurrence of an element.
///
/// The order or retained values is preserved for ordered collections.
/// The order of retained values is preserved for ordered collections.
///
/// # Example
///
Expand Down Expand Up @@ -96,7 +96,7 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {
/// Creates a collection from the original collection without
/// the first occurrences of elements found in another collection.
///
/// The order or retained values is preserved for ordered collections.
/// The order of retained values is preserved for ordered collections.
///
/// # Example
///
Expand Down Expand Up @@ -139,11 +139,12 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {
/// Creates a collection containing combinations of specified size from the elements
/// of the original collection.
///
/// The order or combined values is preserved for ordered collections.
/// Combinations for ordered collections are generated based on element positions, not values.
///
/// To obtain combinations of unique elements for ordered collections, use `.unique().combinations()`.
///
/// The order of combined values is preserved for ordered collections.
///
/// # Example
///
/// ```
Expand Down Expand Up @@ -779,7 +780,7 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {
/// of the original collection with another collection i.e., the values that are
/// both in `self` and `other`.
///
/// The order or retained values is preserved for ordered collections.
/// The order of retained values is preserved for ordered collections.
///
/// # Example
///
Expand Down Expand Up @@ -1022,7 +1023,11 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {

/// Creates a collection containing all subsets of the original collection.
///
/// The order or subset values is preserved for ordered collections.
/// Sub-collections for ordered collections are generated based on element positions, not values.
///
/// To obtain combinations of unique elements for ordered collections, use `.unique().powerset()`.
///
/// The order of combined values is preserved for ordered collections.
///
/// # Example
///
Expand Down Expand Up @@ -1128,7 +1133,7 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {
/// Creates a collection from the original collection by replacing the
/// first occurrence of an element with a replacement value.
///
/// The order or retained values is preserved for ordered collections.
/// The order of retained values is preserved for ordered collections.
///
/// # Example
///
Expand Down Expand Up @@ -1160,7 +1165,7 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {
/// given occurrences of elements found in another collection with elements
/// of a replacement collection.
///
/// The order or retained values is preserved for ordered collections.
/// The order of retained values is preserved for ordered collections.
///
/// # Example
///
Expand Down
1 change: 0 additions & 1 deletion src/extensions/traversable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ pub trait Traversable<Item> {
/// The reducing function is a closure with two arguments: an 'accumulator', and an element.
/// For collections with at least one element, this is the same as [`fold()`]
/// with the first element of the collection as the initial accumulator value, folding
/// every subsequent element into it.
///
/// This is a non-consuming variant of [`reduce_to`].
///
Expand Down

0 comments on commit c65677c

Please sign in to comment.