1
Fork 0

Fix doc tests for trim_right_matches

This commit is contained in:
Benjamin Hoffmeyer 2017-11-20 13:37:56 -05:00 committed by GitHub
parent e06138338f
commit b3baa835fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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