diff options
| author | Benjamin Hoffmeyer <hoffmeyer25@gmail.com> | 2017-11-20 13:37:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-20 13:37:56 -0500 |
| commit | b3baa835fc4f92376c1528fc7f0ea7e988773fee (patch) | |
| tree | f8bd0ce7d840441ca625f9469838a72b53b405bc /src/liballoc | |
| parent | e06138338f78cd2695f857855e685e9e50a2486b (diff) | |
| download | rust-b3baa835fc4f92376c1528fc7f0ea7e988773fee.tar.gz rust-b3baa835fc4f92376c1528fc7f0ea7e988773fee.zip | |
Fix doc tests for trim_right_matches
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/str.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index f68ee847eb3..026825b3275 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -1734,7 +1734,7 @@ impl str { /// A more complex pattern, using a closure: /// /// ``` - /// assert_eq!("1fooX".trim_left_matches(|c| c == '1' || c == 'X'), "fooX"); + /// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "fooX"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str |
