Skip to content

Commit 9d954f0

Browse files
authored
Unrolled build for #148609
Rollup merge of #148609 - AMDmi3:rsplit_once_example, r=chenyukang Sync str::rsplit_once example with str::split_once This adds `"cfg=".rsplit_once('=')` case to `rsplit_once` example, bringing it in sync with example for `split_once`. For consistency and to make life easier for ones who want to ensure bahaviour of this specific edge case.
2 parents c90bcb9 + b975c57 commit 9d954f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/str/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,7 @@ impl str {
19531953
///
19541954
/// ```
19551955
/// assert_eq!("cfg".rsplit_once('='), None);
1956+
/// assert_eq!("cfg=".rsplit_once('='), Some(("cfg", "")));
19561957
/// assert_eq!("cfg=foo".rsplit_once('='), Some(("cfg", "foo")));
19571958
/// assert_eq!("cfg=foo=bar".rsplit_once('='), Some(("cfg=foo", "bar")));
19581959
/// ```

0 commit comments

Comments
 (0)