8000 string: Add documentation for `From` impls by denisvasilik · Pull Request #55874 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content
8000

string: Add documentation for From impls #55874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 14, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Whitespace cleanup according to Rust's style guidelines.
  • Loading branch information
denisvasilik committed Nov 11, 2018
commit dc0fd65af23bec1de6ae0608c40f0bbcb52d4747
6 changes: 3 additions & 3 deletions src/liballoc/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ impl<'a> From<&'a str> for String {
#[cfg(not(test))]
#[stable(feature = "string_from_box", since = "1.18.0")]
impl From<Box<str>> for String {
/// Converts the given boxed `str` slice to a `String`.
/// Converts the given boxed `str` slice to a `String`.
/// It is notable that the `str` slice is owned.
///
/// # Examples
Expand All @@ -2216,7 +2216,7 @@ impl From<Box<str>> for String {
/// ```
/// let s1 : String = String::from("hello world");
/// let s2 : Box<str> = s1.into_boxed_str();
/// let s3 : String = String::from(s2);
/// let s3 : String = String::from(s2);
///
/// assert_eq!("hello world", s3)
/// ```
Expand Down Expand Up @@ -2308,7 +2308,7 @@ impl From<String> for Vec<u8> {
/// ```
/// let s1 = String::from("hello world");
/// let v1 = Vec::from(s1);
///
///
/// for b in v1 {
/// println!("{}", b);
/// }
Expand Down
0