File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1161,7 +1161,7 @@ impl str {
1161
1161
/// function or closure that determines if a character matches.
1162
1162
///
1163
1163
/// 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.
1165
1165
/// That is not currently the case. When you pass a slice of [`char`]s to this method, it will return true
1166
1166
/// if any of the [`char`]s in the slice is the first [`char`] of this string slice. It does not work for
1167
1167
/// sequentially comparing a slice of [`char`]s to a string slice. See the second example below.
@@ -1177,11 +1177,11 @@ impl str {
1177
1177
/// assert!(bananas.starts_with("bana"));
1178
1178
/// assert!(!bananas.starts_with("nana"));
1179
1179
/// ```
1180
- ///
1180
+ ///
1181
1181
/// ```
1182
1182
/// let bananas = "bananas";
1183
- ///
1184
- /// // Note that both of these assert successfully.
1183
+ ///
1184
+ /// // Note that both of these assert successfully.
1185
1185
/// assert!(bananas.starts_with(&['b', 'a', 'n', 'a']));
1186
1186
/// assert!(bananas.starts_with(&['a', 'b', 'c', 'd']));
1187
1187
/// ```
You can’t perform that action at this time.
0 commit comments