Skip to content

Commit b3baa83

Browse files
authored
Fix doc tests for trim_right_matches
1 parent e061383 commit b3baa83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/liballoc/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1734,7 +1734,7 @@ impl str {
17341734
/// A more complex pattern, using a closure:
17351735
///
17361736
/// ```
1737-
/// assert_eq!("1fooX".trim_left_matches(|c| c == '1' || c == 'X'), "fooX");
1737+
/// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "fooX");
17381738
/// ```
17391739
#[stable(feature = "rust1", since = "1.0.0")]
17401740
pub fn trim_right_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str

0 commit comments

Comments
 (0)