Skip to content

Commit 2e1426f

Browse files
authored
Rollup merge of rust-lang#98049 - imbolc:patch-3, r=Dylan-DPC
Document an edge case of `str::split_once`
2 parents 36a7593 + acda886 commit 2e1426f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/str/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,7 @@ impl str {
16321632
///
16331633
/// ```
16341634
/// assert_eq!("cfg".split_once('='), None);
1635+
/// assert_eq!("cfg=".split_once('='), Some(("cfg", "")));
16351636
/// assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
16361637
/// assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
16371638
/// ```

0 commit comments

Comments
 (0)