Skip to content

Rearrange sections in "Patterns" #27519

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
Aug 5, 2015
Merged

Conversation

JanLikar
Copy link
Contributor

@JanLikar JanLikar commented Aug 4, 2015

  • Move "Destructuring" after "Multiple patterns", because some of
    later sections include examples which make use of destructuring.
  • Move "Ignoring bindings" after "Destructoring", because the former
    features Result<T,E> destructuring. Some of examples in later
    sections use "_" and "..", so "Ignoring bindings" must be
    positioned before them.
  • Fix difficulty with binding example in patterns.md #27347 by moving "Ref and mut ref" before "Ranges" and
    "Bindings", because "Bindings" section includes a somewhat
    difficult example, which also makes use of "ref" and "mut ref"
    operators.

  - Move "Destructuring" after "Multiple patterns", because some of
    later sections include examples which make use of destructuring.

  - Move "Ignoring bindings" after "Destructoring", because the former
    features Result<T,E> destructuring. Some of examples in later
    sections use "_" and "..", so "Ignoring bindings" must be
    positioned before them.

  - Fix rust-lang#27347 by moving "Ref and mut ref" before "Ranges" and
    "Bindings", because "Bindings" section includes a somewhat
    difficult example, which also makes use of "ref" and "mut ref"
    operators.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (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. 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.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 4, 2015

📌 Commit c1f938d has been approved by steveklabnik

@steveklabnik
Copy link
Member

Thank you! I agree that this ordering makes more sense.

@JanLikar
Copy link
Contributor Author

JanLikar commented Aug 4, 2015

It's still not perfect, but I think it is very hard to showcase intermediate features of Rust without also using some that were never mentioned before. It's a bit like "dependency hell" or "Chicken or the egg" paradox.

@steveklabnik
Copy link
Member

yup, it's taken me a number of iterations over a long period of time to minimize them...

Manishearth added a commit to Manishearth/rust that referenced this pull request Aug 5, 2015
…eklabnik

  - Move "Destructuring" after "Multiple patterns", because some of
    later sections include examples which make use of destructuring.

  - Move "Ignoring bindings" after "Destructoring", because the former
    features Result<T,E> destructuring. Some of examples in later
    sections use "_" and "..", so "Ignoring bindings" must be
    positioned before them.

  - Fix rust-lang#27347 by moving "Ref and mut ref" before "Ranges" and
    "Bindings", because "Bindings" section includes a somewhat
    difficult example, which also makes use of "ref" and "mut ref"
    operators.
bors added a commit that referenced this pull request Aug 5, 2015
@bors bors merged commit c1f938d into rust-lang:master Aug 5, 2015
@JanLikar JanLikar deleted the rearrange-patterns branch September 29, 2015 21:57
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.

5 participants