diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2018-08-22 08:06:39 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2018-08-22 08:35:34 +0200 |
| commit | 11f3918ca2c7913f7976a42539646dc28e86ffcf (patch) | |
| tree | fc231783cb277c00dbe0ad0094ff5c5df57da1bb /src/liballoc | |
| parent | 786ccc336dc684cdb00402e84abe4a9bc53857cf (diff) | |
| download | rust-11f3918ca2c7913f7976a42539646dc28e86ffcf.tar.gz rust-11f3918ca2c7913f7976a42539646dc28e86ffcf.zip | |
docs: std::string::String.repeat(): slightly rephrase to be more in-line with other descriptions.
add ticks around a few keywords in other descriptions.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/str.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/string.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index 870bf971cd3..c451a051c74 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -513,7 +513,7 @@ impl str { unsafe { String::from_utf8_unchecked(slice.into_vec()) } } - /// Create a [`String`] by repeating a string `n` times. + /// Creates a new [`String`] by repeating a string `n` times. /// /// [`String`]: string/struct.String.html /// diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index eabda7123de..aa821abb34c 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -752,7 +752,7 @@ impl String { self.vec } - /// Extracts a string slice containing the entire string. + /// Extracts a string slice containing the entire `String`. /// /// # Examples /// @@ -1454,8 +1454,8 @@ impl String { self.vec.clear() } - /// Creates a draining iterator that removes the specified range in the string - /// and yields the removed chars. + /// Creates a draining iterator that removes the specified range in the `String` + /// and yields the removed `chars`. /// /// Note: The element range is removed even if the iterator is not /// consumed until the end. |
