Skip to content

Commit

Permalink
Rollup merge of rust-lang#119657 - cls:slice_split_once-typo, r=Chris…
Browse files Browse the repository at this point in the history
…Denton

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 rust-lang#112811, the tracking issue for `slice_split_once`, and was encouraged to open a PR.
  • Loading branch information
matthiaskrgr authored Jan 6, 2024
2 parents 67a10bf + 099b15f commit c6a7dce
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 c6a7dce

Please sign in to comment.