Add examples for Rng functions - #5825
Closed
danluu wants to merge 3 commits into
Closed
Conversation
Contributor
|
You are so awesome, that is all. ❤️ |
bors
added a commit
that referenced
this pull request
Apr 11, 2013
This adds an example for most of the methods in Rng. As a total newcomer to Rust, it took a while to figure out how to do basic things like use library functions, because there aren't many usage examples, and most examples that Google turns up are out of date. Something like this would have saved me a bit of time. This might be a bit verbose. Some alternative options would be to consolidate all the examples into one section, or to only have code for the specific function call inline.
flip1995
added a commit
to flip1995/rust
that referenced
this pull request
Aug 11, 2020
Add the new lint `same_item_push` changelog: Add the new lint `same_item_push` Fixed rust-lang#4078. As I said in rust-lang/rust-clippy#4078 (comment), I referrerd to rust-lang/rust-clippy#4647.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Aug 11, 2020
Rollup of 5 pull requests Successful merges: - rust-lang#5825 (Add the new lint `same_item_push`) - rust-lang#5869 (New lint against `Self` as an arbitrary self type) - rust-lang#5870 (enable #[allow(clippy::unsafe_derive_deserialize)]) - rust-lang#5871 (Lint .min(x).max(y) with x < y) - rust-lang#5874 (Make the docs clearer for new contributors) Failed merges: r? @ghost changelog: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an example for most of the methods in Rng.
As a total newcomer to Rust, it took a while to figure out how to do basic things like use library functions, because there aren't many usage examples, and most examples that Google turns up are out of date. Something like this would have saved me a bit of time.
This might be a bit verbose. Some alternative options would be to consolidate all the examples into one section, or to only have code for the specific function call inline.