This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1161,7 +1161,7 @@ impl str {
11611161 /// function or closure that determines if a character matches.
11621162 ///
11631163 /// Note that there is a footgun to this method when using a slice of [`char`]s.
1164- /// Some users may expect that a slice of chars will behave similarly to a `&str` with this method.
1164+ /// Some users may expect that a slice of chars will behave similarly to a `&str` with this method.
11651165 /// That is not currently the case. When you pass a slice of [`char`]s to this method, it will return true
11661166 /// if any of the [`char`]s in the slice is the first [`char`] of this string slice. It does not work for
11671167 /// sequentially comparing a slice of [`char`]s to a string slice. See the second example below.
@@ -1177,11 +1177,11 @@ impl str {
11771177 /// assert!(bananas.starts_with("bana"));
11781178 /// assert!(!bananas.starts_with("nana"));
11791179 /// ```
1180- ///
1180+ ///
11811181 /// ```
11821182 /// let bananas = "bananas";
1183- ///
1184- /// // Note that both of these assert successfully.
1183+ ///
1184+ /// // Note that both of these assert successfully.
11851185 /// assert!(bananas.starts_with(&['b', 'a', 'n', 'a']));
11861186 /// assert!(bananas.starts_with(&['a', 'b', 'c', 'd']));
11871187 /// ```
You can’t perform that action at this time.
0 commit comments