Skip to content

Commit

Permalink
Rollup merge of #98049 - imbolc:patch-3, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Document an edge case of `str::split_once`
  • Loading branch information
matthiaskrgr committed Jun 13, 2022
2 parents 94443f2 + acda886 commit 62eb97a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,7 @@ impl str {
///
/// ```
/// assert_eq!("cfg".split_once('='), None);
/// assert_eq!("cfg=".split_once('='), Some(("cfg", "")));
/// assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
/// assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
/// ```
Expand Down

0 comments on commit 62eb97a

Please sign in to comment.