diff options
| author | kennytm <kennytm@gmail.com> | 2017-11-21 03:14:49 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-21 03:14:49 +0800 |
| commit | 079a6e4cc2ade85faf8c7a4be1bbbd60c7aee9c1 (patch) | |
| tree | 4119c95ebf6262443329231476851dfc4814364d /src/liballoc | |
| parent | 2a2b2f4a5b85a0711c980071e86185c2ec08fb1e (diff) | |
| parent | f69d4d44d8de9edbf94e240bbd2ba252c6937179 (diff) | |
| download | rust-079a6e4cc2ade85faf8c7a4be1bbbd60c7aee9c1.tar.gz rust-079a6e4cc2ade85faf8c7a4be1bbbd60c7aee9c1.zip | |
Rollup merge of #46128 - Coding-Doctors:patch-1, r=dtolnay
Fix doc tests for trim_right_matches First pr, but isn't anything big so hopefully it should all be good.
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..6e8515f0b36 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'), "1foo"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str |
