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

book: update example patterns to be more clear #35465

Merged
merged 1 commit into from
Aug 10, 2016

Conversation

cardoe
Copy link
Contributor

@cardoe cardoe commented Aug 7, 2016

When using Point { x: 0, y: 0 } and showing pattern matching decomposing
x and y individually its hard to understand. By using a different value
for x and a different value for y it is more clear.

@rust-highfive
Copy link
Collaborator

r? @steveklabnik

(rust_highfive has picked a reviewer for you, use r? to override)

@steveklabnik
Copy link
Member

So, I like this change, but then we shouldn't call the binding origin. Can you fix that as well? Maybe just point?

@cardoe
Copy link
Contributor Author

cardoe commented Aug 8, 2016

Good point. Fix coming up.

When using Point { x: 0, y: 0 } and showing pattern matching decomposing
x and y individually its hard to understand. By using a different value
for x and a different value for y it is more clear.
@steveklabnik
Copy link
Member

@bors: r+ rollup

thanks!

@bors
Copy link
Contributor

bors commented Aug 8, 2016

📌 Commit 18565c6 has been approved by steveklabnik

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 8, 2016
…klabnik

book: update example patterns to be more clear

When using Point { x: 0, y: 0 } and showing pattern matching decomposing
x and y individually its hard to understand. By using a different value
for x and a different value for y it is more clear.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Aug 10, 2016
…klabnik

book: update example patterns to be more clear

When using Point { x: 0, y: 0 } and showing pattern matching decomposing
x and y individually its hard to understand. By using a different value
for x and a different value for y it is more clear.
bors added a commit that referenced this pull request Aug 10, 2016
@bors bors merged commit 18565c6 into rust-lang:master Aug 10, 2016
@cardoe cardoe deleted the pattern-book-update branch August 14, 2016 13:34
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.

4 participants