Skip to content

Commit 11f3918

Browse files
committed
docs: std::string::String.repeat(): slightly rephrase to be more in-line with other descriptions.
add ticks around a few keywords in other descriptions.
1 parent 786ccc3 commit 11f3918

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/liballoc/str.rs

+1-1
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

+3-3
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)