Skip to content

Commit

Permalink
Rollup merge of #119657 - cls:slice_split_once-typo, r=ChrisDenton
Browse files Browse the repository at this point in the history
Fix typo in docs for slice::split_once, slice::rsplit_once

This fixes a typo in the doc comments for these methods, which I tripped over while reading the docs: "If any matching elements are **resent** in the slice [...]", which is presumably meant to read **present**.

I mentioned this in #112811, the tracking issue for `slice_split_once`, and was encouraged to open a PR.
  • Loading branch information
compiler-errors committed Jan 7, 2024
2 parents e63a32e + 099b15f commit 5117dc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@ impl<T> [T] {
/// Splits the slice on the first element that matches the specified
/// predicate.
///
/// If any matching elements are resent in the slice, returns the prefix
/// If any matching elements are present in the slice, returns the prefix
/// before the match and suffix after. The matching element itself is not
/// included. If no elements match, returns `None`.
///
Expand Down Expand Up @@ -2511,7 +2511,7 @@ impl<T> [T] {
/// Splits the slice on the last element that matches the specified
/// predicate.
///
/// If any matching elements are resent in the slice, returns the prefix
/// If any matching elements are present in the slice, returns the prefix
/// before the match and suffix after. The matching element itself is not
/// included. If no elements match, returns `None`.
///
Expand Down

0 comments on commit 5117dc7

Please sign in to comment.