Fix result for assert_eq

This commit is contained in:
Benjamin Hoffmeyer 2017-11-20 13:47:42 -05:00 committed by GitHub
parent b3baa835fc
commit f69d4d44d8
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_right_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