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

API Docs: convert #29349

Closed
5 tasks done
steveklabnik opened this issue Oct 26, 2015 · 9 comments
Closed
5 tasks done

API Docs: convert #29349

steveklabnik opened this issue Oct 26, 2015 · 9 comments
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. P-medium Medium priority

Comments

@steveklabnik
Copy link
Member

steveklabnik commented Oct 26, 2015

Part of #29329

http://doc.rust-lang.org/std/convert/

Here's what needs to be done to close out this issue:

  • the module documentation is great, but has a lot of abbreviations, so the wording could be cleaned up a bit.
  • AsMut should compare itself to AsRef, and should show a sample implementation.
  • AsRef needs far better docs, as it is one of the most misunderstood traits in Rust. Specifically it should talk about its relationship with Borrow. It also needs an example implementation.
  • From needs a lot of work; it should talk about its usage in ?, it should show an example implementation, and general improvement.
  • Into is mostly fine, but "generic impls" should say "implementations" and it should be above examples.
mackwic pushed a commit to mackwic/rust that referenced this issue Jan 14, 2016
Also add a note about the necessary simplicity of the conversion.
Related issue: rust-lang#29349
bors added a commit that referenced this issue Feb 1, 2016
Also add a note about the necessary simplicity of the conversion.
Related issue: #29349

r? @steveklabnik
@steveklabnik steveklabnik added the E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. label Mar 8, 2017
@steveklabnik
Copy link
Member Author

I am happy to mentor anyone who wants to tackle this issue.

@steveklabnik steveklabnik added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Mar 10, 2017
@steveklabnik steveklabnik added P-medium Medium priority E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. and removed A-docs labels Mar 24, 2017
@maccoda
Copy link
Contributor

maccoda commented Mar 25, 2017

I would be keen to give this one a go @steveklabnik I'm interested in understanding this section better.

@steveklabnik
Copy link
Member Author

Awesome, @maccoda ! Let me know if I can help you help me in any way 😄

@maccoda
Copy link
Contributor

maccoda commented Mar 30, 2017

Hey @steveklabnik ,
Just a couple of questions:

  1. In the issue description for the Into trait you say to have the generic implementations above the examples,

and it should be above examples.

It turns out all of the traits have the examples above the generic implementations. Should I move the generic implementations above the examples for all of the traits?

  1. In adding sample implementation do you like to make a generic example or use a common example from the std lib? I only ask because I have become familiar with AsRef through the usage within the fs package in creating paths and was thinking of using this as an example. What are your thoughts?

  2. The AsRef relationship with Borrow is where I am having a bit of trouble explaining this concisely. Are we wanting to have a brief summarization of the section in the book and do we need to reciprocate or align with the documentation for the Borrow trait? I only ask as I feel to explain the difference I am describing the Borrow trait a bit and do not want to introduce a second differing description.

Thanks 😄

@steveklabnik
Copy link
Member Author

Hey @maccoda !

Should I move the generic implementations above the examples for all of the traits?

Yes, that'd be great!

In adding sample implementation do you like to make a generic example or use a common example from the std lib?

Ideally, we'd have both: one extremely simple example for people to be able to copy/paste, and one more realistic example. Feel free to submit one or both 😄

The AsRef relationship with Borrow is where I am having a bit of trouble explaining this concisely.

yes it's tough!

Are we wanting to have a brief summarization of the section in the book and do we need to reciprocate or align with the documentation for the Borrow trait?

The second edition of the book does not have that chapter; synchronizing these API docs is the right way to go 👍

@maccoda
Copy link
Contributor

maccoda commented Apr 1, 2017

OK great 😄 I will hopefully have something in today to start picking apart. 👍

@maccoda
Copy link
Contributor

maccoda commented Apr 1, 2017

Hey @steveklabnik ,
I had a look at the RFC mentioned in the contribution guide and couldn't find anything on the guidelines for line length. I only ask as one of the Travis builds failed due to the line exceeding 100 chars, so was wondering what I should be aiming for.

Thanks again! 😄

@steveklabnik
Copy link
Member Author

steveklabnik commented Apr 1, 2017 via email

frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 20, 2017
API docs: Convert

Clean up of the convert module documentation following points in rust-lang#29349
@steveklabnik
Copy link
Member Author

This is now done! 🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools E-help-wanted Call for participation: Help is requested to fix this issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants