Skip to content
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

fs::write: Add example writing a &str #50624

Merged
merged 1 commit into from
May 13, 2018
Merged

fs::write: Add example writing a &str #50624

merged 1 commit into from
May 13, 2018

Conversation

adevore
Copy link
Contributor

@adevore adevore commented May 10, 2018

This adds an example to the documentation for fs::write that demonstrates the use of the AsRef<[u8]> implementation for &str. Experienced users should already recognize the possibility from the type signature, but new users may not recognize the significance.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2018
@steveklabnik
Copy link
Member

Thank you!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented May 10, 2018

📌 Commit 2ae8acc has been approved by steveklabnik

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 10, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this pull request May 11, 2018
…veklabnik

fs::write: Add example writing a &str

This adds an example to the documentation for `fs::write` that demonstrates the use of the `AsRef<[u8]>` implementation for &str. Experienced users should already recognize the possibility from the type signature, but new users may not recognize the significance.
kennytm added a commit to kennytm/rust that referenced this pull request May 12, 2018
…veklabnik

fs::write: Add example writing a &str

This adds an example to the documentation for `fs::write` that demonstrates the use of the `AsRef<[u8]>` implementation for &str. Experienced users should already recognize the possibility from the type signature, but new users may not recognize the significance.
bors added a commit that referenced this pull request May 12, 2018
Rollup of 13 pull requests

Successful merges:

 - #50544 (Cleanup some dependencies)
 - #50545 (Made some functions in time module const)
 - #50550 (use fmt::Result where applicable)
 - #50558 (Remove all reference to DepGraph::work_products)
 - #50602 (Update canonicalize docs)
 - #50607 (Allocate Symbol strings from an arena)
 - #50613 (Migrate the toolstate update bot to rust-highfive)
 - #50624 (fs::write: Add example writing a &str)
 - #50634 (Do not silently truncate offsets for `read_at`/`write_at` on emscripten)
 - #50644 (AppVeyor: Read back trace from crash dump on failure.)
 - #50661 (Ignore non .rs files for tidy libcoretest)
 - #50663 (rustc: Allow an edition's feature on that edition)
 - #50667 (rustc: Only suggest deleting `extern crate` if it works)

Failed merges:
kennytm added a commit to kennytm/rust that referenced this pull request May 13, 2018
…veklabnik

fs::write: Add example writing a &str

This adds an example to the documentation for `fs::write` that demonstrates the use of the `AsRef<[u8]>` implementation for &str. Experienced users should already recognize the possibility from the type signature, but new users may not recognize the significance.
bors added a commit that referenced this pull request May 13, 2018
Rollup of 8 pull requests

Successful merges:

 - #50624 (fs::write: Add example writing a &str)
 - #50634 (Do not silently truncate offsets for `read_at`/`write_at` on emscripten)
 - #50644 (AppVeyor: Read back trace from crash dump on failure.)
 - #50661 (Ignore non .rs files for tidy libcoretest)
 - #50663 (rustc: Allow an edition's feature on that edition)
 - #50667 (rustc: Only suggest deleting `extern crate` if it works)
 - #50670 (rustc: Include semicolon when removing `extern crate`)
 - #50678 (Update openbsd targets)

Failed merges:
@bors bors merged commit 2ae8acc into rust-lang:master May 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants