Skip to content

Commit

Permalink
Rollup merge of rust-lang#53592 - matthiaskrgr:str_doc, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mark-Simulacrum authored Aug 22, 2018
2 parents 3da92a0 + 11f3918 commit b71140a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/liballoc/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
6 changes: 3 additions & 3 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b71140a

Please sign in to comment.