Skip to content

Commit b71140a

Browse files
Rollup merge of rust-lang#53592 - matthiaskrgr:str_doc, r=alexcrichton
docs: minor stylistic changes to str/string docs std::string::String.repeat(): slightly rephrase to be more in-line with other descriptions. add ticks around a few keywords in other descriptions.
2 parents 3da92a0 + 11f3918 commit b71140a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/liballoc/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ impl str {
513513
unsafe { String::from_utf8_unchecked(slice.into_vec()) }
514514
}
515515

516-
/// Create a [`String`] by repeating a string `n` times.
516+
/// Creates a new [`String`] by repeating a string `n` times.
517517
///
518518
/// [`String`]: string/struct.String.html
519519
///

src/liballoc/string.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ impl String {
752752
self.vec
753753
}
754754

755-
/// Extracts a string slice containing the entire string.
755+
/// Extracts a string slice containing the entire `String`.
756756
///
757757
/// # Examples
758758
///
@@ -1454,8 +1454,8 @@ impl String {
14541454
self.vec.clear()
14551455
}
14561456

1457-
/// Creates a draining iterator that removes the specified range in the string
1458-
/// and yields the removed chars.
1457+
/// Creates a draining iterator that removes the specified range in the `String`
1458+
/// and yields the removed `chars`.
14591459
///
14601460
/// Note: The element range is removed even if the iterator is not
14611461
/// consumed until the end.

0 commit comments

Comments
 (0)