]> git.lizzy.rs Git - rust.git/commitdiff
Correct the docs on str::trim_matches
authorWithout Boats <woboats@gmail.com>
Sun, 15 May 2016 00:58:48 +0000 (17:58 -0700)
committerWithout Boats <woboats@gmail.com>
Sun, 15 May 2016 00:58:48 +0000 (17:58 -0700)
This pattern cannot be a str because str's pattern is not double-ended.

src/libcollections/str.rs

index 2059943bfdf6140ca9ecb615338a21a2b5773ded..7322ad38ff4704d22a0359f1d8d3a52591a20c75 100644 (file)
@@ -1617,8 +1617,8 @@ pub fn trim_right(&self) -> &str {
     /// Returns a string slice with all prefixes and suffixes that match a
     /// pattern repeatedly removed.
     ///
-    /// The pattern can be a `&str`, [`char`], or a closure that determines
-    /// if a character matches.
+    /// The pattern can be a [`char`] or a closure that determines if a
+    /// character matches.
     ///
     /// [`char`]: primitive.char.html
     ///