mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 03:07:24 +03:00
Fix whitespace issues that tidy caught
This commit is contained in:
committed by
GitHub
parent
f0c6f5a7fe
commit
8ff1994ec0
@@ -1161,7 +1161,7 @@ pub fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool {
|
||||
/// function or closure that determines if a character matches.
|
||||
///
|
||||
/// Note that there is a footgun to this method when using a slice of [`char`]s.
|
||||
/// Some users may expect that a slice of chars will behave similarly to a `&str` with this method.
|
||||
/// Some users may expect that a slice of chars will behave similarly to a `&str` with this method.
|
||||
/// That is not currently the case. When you pass a slice of [`char`]s to this method, it will return true
|
||||
/// if any of the [`char`]s in the slice is the first [`char`] of this string slice. It does not work for
|
||||
/// sequentially comparing a slice of [`char`]s to a string slice. See the second example below.
|
||||
@@ -1177,11 +1177,11 @@ pub fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool {
|
||||
/// assert!(bananas.starts_with("bana"));
|
||||
/// assert!(!bananas.starts_with("nana"));
|
||||
/// ```
|
||||
///
|
||||
///
|
||||
/// ```
|
||||
/// let bananas = "bananas";
|
||||
///
|
||||
/// // Note that both of these assert successfully.
|
||||
///
|
||||
/// // Note that both of these assert successfully.
|
||||
/// assert!(bananas.starts_with(&['b', 'a', 'n', 'a']));
|
||||
/// assert!(bananas.starts_with(&['a', 'b', 'c', 'd']));
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user