about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2020-04-13 22:24:58 +0800
committerIvan Tham <pickfire@riseup.net>2020-04-13 22:24:58 +0800
commitcbe96b04ad9a7109febac47e660d993b45542c1f (patch)
tree065d531198f2d733be31a8631f979a5e0fc184f2
parentd28a46444eacf066ea0e7fdf6eda066e315aaa4a (diff)
downloadrust-cbe96b04ad9a7109febac47e660d993b45542c1f.tar.gz
rust-cbe96b04ad9a7109febac47e660d993b45542c1f.zip
Add period to Pattern docs
-rw-r--r--src/liballoc/string.rs2
-rw-r--r--src/libcore/str/pattern.rs10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 1e5fe125c55..cc628fe0f0c 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -1827,7 +1827,7 @@ impl<'a> Extend<Cow<'a, str>> for String {
     }
 }
 
-/// A convenience impl that delegates to the impl for `&str`
+/// A convenience impl that delegates to the impl for `&str`.
 #[unstable(
     feature = "pattern",
     reason = "API not fully fleshed out and ready to be stabilized",
diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs
index 30fd55f7b7f..2f82ba02eb2 100644
--- a/src/libcore/str/pattern.rs
+++ b/src/libcore/str/pattern.rs
@@ -451,7 +451,7 @@ unsafe impl<'a> ReverseSearcher<'a> for CharSearcher<'a> {
 
 impl<'a> DoubleEndedSearcher<'a> for CharSearcher<'a> {}
 
-/// Searches for chars that are equal to a given char
+/// Searches for chars that are equal to a given `char`.
 impl<'a> Pattern<'a> for char {
     type Searcher = CharSearcher<'a>;
 
@@ -696,7 +696,7 @@ unsafe impl<'a, 'b> ReverseSearcher<'a> for CharSliceSearcher<'a, 'b> {
 
 impl<'a, 'b> DoubleEndedSearcher<'a> for CharSliceSearcher<'a, 'b> {}
 
-/// Searches for chars that are equal to any of the chars in the array
+/// Searches for chars that are equal to any of the chars in the array.
 impl<'a, 'b> Pattern<'a> for &'b [char] {
     pattern_methods!(CharSliceSearcher<'a, 'b>, MultiCharEqPattern, CharSliceSearcher);
 }
@@ -738,7 +738,7 @@ where
 
 impl<'a, F> DoubleEndedSearcher<'a> for CharPredicateSearcher<'a, F> where F: FnMut(char) -> bool {}
 
-/// Searches for chars that match the given predicate
+/// Searches for chars that match the given predicate.
 impl<'a, F> Pattern<'a> for F
 where
     F: FnMut(char) -> bool,
@@ -771,7 +771,7 @@ impl<'a, 'b> Pattern<'a> for &'b str {
         StrSearcher::new(haystack, self)
     }
 
-    /// Checks whether the pattern matches at the front of the haystack
+    /// Checks whether the pattern matches at the front of the haystack.
     #[inline]
     fn is_prefix_of(self, haystack: &'a str) -> bool {
         haystack.as_bytes().starts_with(self.as_bytes())
@@ -788,7 +788,7 @@ impl<'a, 'b> Pattern<'a> for &'b str {
         }
     }
 
-    /// Checks whether the pattern matches at the back of the haystack
+    /// Checks whether the pattern matches at the back of the haystack.
     #[inline]
     fn is_suffix_of(self, haystack: &'a str) -> bool {
         haystack.as_bytes().ends_with(self.as_bytes())