Skip to content

Commit cbe96b0

Browse files
committed
Add period to Pattern docs
1 parent d28a464 commit cbe96b0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/liballoc/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ impl<'a> Extend<Cow<'a, str>> for String {
18271827
}
18281828
}
18291829

1830-
/// A convenience impl that delegates to the impl for `&str`
1830+
/// A convenience impl that delegates to the impl for `&str`.
18311831
#[unstable(
18321832
feature = "pattern",
18331833
reason = "API not fully fleshed out and ready to be stabilized",

src/libcore/str/pattern.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ unsafe impl<'a> ReverseSearcher<'a> for CharSearcher<'a> {
451451

452452
impl<'a> DoubleEndedSearcher<'a> for CharSearcher<'a> {}
453453

454-
/// Searches for chars that are equal to a given char
454+
/// Searches for chars that are equal to a given `char`.
455455
impl<'a> Pattern<'a> for char {
456456
type Searcher = CharSearcher<'a>;
457457

@@ -696,7 +696,7 @@ unsafe impl<'a, 'b> ReverseSearcher<'a> for CharSliceSearcher<'a, 'b> {
696696

697697
impl<'a, 'b> DoubleEndedSearcher<'a> for CharSliceSearcher<'a, 'b> {}
698698

699-
/// Searches for chars that are equal to any of the chars in the array
699+
/// Searches for chars that are equal to any of the chars in the array.
700700
impl<'a, 'b> Pattern<'a> for &'b [char] {
701701
pattern_methods!(CharSliceSearcher<'a, 'b>, MultiCharEqPattern, CharSliceSearcher);
702702
}
@@ -738,7 +738,7 @@ where
738738

739739
impl<'a, F> DoubleEndedSearcher<'a> for CharPredicateSearcher<'a, F> where F: FnMut(char) -> bool {}
740740

741-
/// Searches for chars that match the given predicate
741+
/// Searches for chars that match the given predicate.
742742
impl<'a, F> Pattern<'a> for F
743743
where
744744
F: FnMut(char) -> bool,
@@ -771,7 +771,7 @@ impl<'a, 'b> Pattern<'a> for &'b str {
771771
StrSearcher::new(haystack, self)
772772
}
773773

774-
/// Checks whether the pattern matches at the front of the haystack
774+
/// Checks whether the pattern matches at the front of the haystack.
775775
#[inline]
776776
fn is_prefix_of(self, haystack: &'a str) -> bool {
777777
haystack.as_bytes().starts_with(self.as_bytes())
@@ -788,7 +788,7 @@ impl<'a, 'b> Pattern<'a> for &'b str {
788788
}
789789
}
790790

791-
/// Checks whether the pattern matches at the back of the haystack
791+
/// Checks whether the pattern matches at the back of the haystack.
792792
#[inline]
793793
fn is_suffix_of(self, haystack: &'a str) -> bool {
794794
haystack.as_bytes().ends_with(self.as_bytes())

0 commit comments

Comments
 (0)