Skip to content

Commit c6a7dce

Browse files
authored
Rollup merge of #119657 - cls:slice_split_once-typo, r=ChrisDenton
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.
2 parents 67a10bf + 099b15f commit c6a7dce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/slice/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2483,7 +2483,7 @@ impl<T> [T] {
24832483
/// Splits the slice on the first element that matches the specified
24842484
/// predicate.
24852485
///
2486-
/// If any matching elements are resent in the slice, returns the prefix
2486+
/// If any matching elements are present in the slice, returns the prefix
24872487
/// before the match and suffix after. The matching element itself is not
24882488
/// included. If no elements match, returns `None`.
24892489
///
@@ -2511,7 +2511,7 @@ impl<T> [T] {
25112511
/// Splits the slice on the last element that matches the specified
25122512
/// predicate.
25132513
///
2514-
/// If any matching elements are resent in the slice, returns the prefix
2514+
/// If any matching elements are present in the slice, returns the prefix
25152515
/// before the match and suffix after. The matching element itself is not
25162516
/// included. If no elements match, returns `None`.
25172517
///

0 commit comments

Comments
 (0)