Skip to content

Commit acda886

Browse files
authored
Document an edge case of str::split_once
1 parent 083721a commit acda886

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)