diff options
| author | Gigih Aji Ibrahim <bungcip@gmail.com> | 2016-04-14 03:39:10 +0700 |
|---|---|---|
| committer | Gigih Aji Ibrahim <bungcip@gmail.com> | 2016-04-14 03:43:29 +0700 |
| commit | 2bf000349a06f874f8bb6c67a37d3ff533e36165 (patch) | |
| tree | a33327d2a0d41548d9a7c35adbeedefc415d72d2 /src/libcollections | |
| parent | 525aa6102250ec2a33c7066dfb966524f0ce3e21 (diff) | |
| download | rust-2bf000349a06f874f8bb6c67a37d3ff533e36165.tar.gz rust-2bf000349a06f874f8bb6c67a37d3ff533e36165.zip | |
fix str::split_at_mut() example
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/str.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index b2b1e019a1b..2059943bfdf 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -634,9 +634,9 @@ impl str { /// Basic usage: /// /// ``` - /// let s = "Per Martin-Löf"; + /// let mut s = "Per Martin-Löf".to_string(); /// - /// let (first, last) = s.split_at(3); + /// let (first, last) = s.split_at_mut(3); /// /// assert_eq!("Per", first); /// assert_eq!(" Martin-Löf", last); |
