Skip to content

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

Merged
merged 1 commit into from
Apr 11, 2015
Merged

Add examples for Convert #24121

merged 1 commit into from
Apr 11, 2015

Conversation

steveklabnik
Copy link
Member

No description provided.

@steveklabnik
Copy link
Member Author

/cc @TimNN

@steveklabnik
Copy link
Member Author

I couldn't figure out a good example for AsMut

//! 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`.
Copy link
Contributor

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)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure, tbh

@alexcrichton
Copy link
Member

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

@steveklabnik
Copy link
Member Author

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

@aturon
Copy link
Member

aturon commented Apr 8, 2015

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!

@steveklabnik
Copy link
Member Author

@aturon 👍 , let's do that in another pass.

@alexcrichton I should have fixed tidy now

@alexcrichton
Copy link
Member

@bors: r+ 5a90661 rollup

@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)

@steveklabnik
Copy link
Member Author

@bors: r=alexcrichton rollup

@bors
Copy link
Collaborator

bors commented Apr 10, 2015

📌 Commit 5a90661 has been approved by alexcrichton

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
bors added a commit that referenced this pull request Apr 10, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 10, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 10, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 10, 2015
@bors
Copy link
Collaborator

bors commented Apr 10, 2015

📌 Commit b6c8e23 has been approved by alexcrichton

@steveklabnik
Copy link
Member Author

@bors: r=alexcrichton rollup

@bors
Copy link
Collaborator

bors commented Apr 10, 2015

📌 Commit b6c8e23 has been approved by alexcrichton

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
bors added a commit that referenced this pull request Apr 10, 2015
@steveklabnik
Copy link
Member Author

😢 😭 😭

@steveklabnik
Copy link
Member Author

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 10, 2015

📌 Commit 288b1c9 has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 10, 2015
Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 11, 2015
@bors bors merged commit 288b1c9 into rust-lang:master Apr 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants