Skip to content

Commit a0dc25b

Browse files
authored
Document an edge case of str::split_once
1 parent bb8ceeb commit a0dc25b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/str/mod.rs

Lines changed: 1 addition & 0 deletions
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)