-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add examples for Convert #24121
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
Add examples for Convert #24121
Conversation
/cc @TimNN |
I couldn't figure out a good example for |
//! conversions from one type to another. They follow the standard | ||
//! Rust conventions of `as`/`to`/`into`/`from`. | ||
//! The traits in this module provide a general way to talk about conversions from one type to | ||
//! another. They follow the standard Rust conventions of `as`/`to`/`into`/`from`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these standard conventions documented and what are they?
(I think I know what they are but I'm not really sure)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure, tbh
I think that long term this module wants good meaty explanations of each trait as well in addition to examples as they're all serving quite important roles and currently the descriptions are a little terse. That being said I'm also totally fine landing examples ASAP! cc @aturon |
I'm also happy with improving the descriptions significantly as well, I just lack the experience with these APIs to give them a good start. If you or @aturon have thoughts, I'm happy to chat about it and then expand them inthis PR |
I agree that we'll want more general docs (and @steveklabnik, I'm happy to download my thoughts to you at some point), but in any case these examples look good! |
@aturon 👍 , let's do that in another pass. @alexcrichton I should have fixed tidy now |
@TimNN and @apasel422 I think there's definitely still a lot of room for these docs to improve in terms of the bodies, but for examples I think these are good to land for now (with a second pass for more wordy additions) |
@bors: r=alexcrichton rollup |
📌 Commit 5a90661 has been approved by |
📌 Commit b6c8e23 has been approved by |
@bors: r=alexcrichton rollup |
📌 Commit b6c8e23 has been approved by |
😢 😭 😭 |
@bors: r+ rollup |
📌 Commit 288b1c9 has been approved by |
No description provided.