Skip to content

Commit 2bf0003

Browse files
committed
fix str::split_at_mut() example
1 parent 525aa61 commit 2bf0003

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcollections/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,9 @@ impl str {
634634
/// Basic usage:
635635
///
636636
/// ```
637-
/// let s = "Per Martin-Löf";
637+
/// let mut s = "Per Martin-Löf".to_string();
638638
///
639-
/// let (first, last) = s.split_at(3);
639+
/// let (first, last) = s.split_at_mut(3);
640640
///
641641
/// assert_eq!("Per", first);
642642
/// assert_eq!(" Martin-Löf", last);

0 commit comments

Comments
 (0)