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

Add destructuring bind examples #1238

Merged
merged 1 commit into from
Aug 8, 2019

Conversation

pawroman
Copy link
Contributor

@pawroman pawroman commented Aug 6, 2019

I thought it would be great to add examples of "destructuring bind". Not sure if I'm using the right terminology, happy to adjust if not.

@rust-highfive
Copy link

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

@pawroman
Copy link
Contributor Author

pawroman commented Aug 6, 2019

Looks like Travis timed out with fatal: unable to access 'https://github.com/rust-lang/rust-by-example.git/': Failed to connect to github.com port 443: Connection timed out 😞

@marioidival marioidival merged commit b74bd53 into rust-lang:master Aug 8, 2019
@marioidival
Copy link
Member

@pawroman thank you!

Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
Update books

## nomicon

25 commits in 8a7d05615e5bc0a7fb961b4919c44f5221ee54da..38b9a76bc8b59ac862663807fc51c9b757337fd6
2019-08-07 07:46:59 -0500 to 2019-08-19 10:04:32 -0400
- Fix transmute_copy link
- some edits
- drop parenthetical
- clarify dangling
- fix def.n of dangling
- fold uninit integer rule with reading uninit memory
- refactor null a bit
- resolve some nits
- raw ptrs must be initialized like integers
- Apply suggestions from code review
- explain when metadata is invalid
- mention !
- add more cases of UB
- avoid redundant UB
- stick to broader UB for raw ptr offsets/derefs for now
- be more precise about dangling
- subsume the NonNull things as library types
- handle recursion in the heading
- Define 'producing'
- NonNull, NonZero*
- list more ptr offset computations
- UB
- Fix typo in subtyping
- Add colon to `MySuperSliceable` too
- Fix typo `str::mem` to `std::mem`

## reference

2 commits in b4b3536..d191a0c
2019-08-07 02:29:50 +0200 to 2019-08-15 08:42:23 +0200
- Fix warning in stable-check (rust-lang/reference#653)
- our closure syntax comes from Ruby (rust-lang/reference#650)

## rust-by-example

5 commits in f2c15ba5ee89ae9469a2cf60494977749901d764..580839d90aacd537f0293697096fa8355bc4e673
2019-08-07 10:14:25 -0300 to 2019-08-17 23:17:50 -0300
- macros.md: Changing Sometime to more appropriate adverb form Sometimes (rust-lang/rust-by-example#1243)
- Add colon after "See Also" (rust-lang/rust-by-example#1242)
- Update enter_question_mark.md (rust-lang/rust-by-example#1208)
- Add destructuring bind examples (rust-lang/rust-by-example#1238)
- Change initial parameters in `fibonacci()` call. (rust-lang/rust-by-example#1241)

## embedded-book

1 commits in c5da1e11915d3f28266168baaf55822f7e3fe999..432ca26686c11d396eed6a59499f93ce1bf2433c
2019-08-05 23:02:10 +0000 to 2019-08-09 23:20:22 +0000
- semihosting: add comment adding feature flag to panic-semihosting  (rust-embedded/book#203)
Centril added a commit to Centril/rust that referenced this pull request Aug 21, 2019
Update books

## nomicon

25 commits in 8a7d05615e5bc0a7fb961b4919c44f5221ee54da..38b9a76bc8b59ac862663807fc51c9b757337fd6
2019-08-07 07:46:59 -0500 to 2019-08-19 10:04:32 -0400
- Fix transmute_copy link
- some edits
- drop parenthetical
- clarify dangling
- fix def.n of dangling
- fold uninit integer rule with reading uninit memory
- refactor null a bit
- resolve some nits
- raw ptrs must be initialized like integers
- Apply suggestions from code review
- explain when metadata is invalid
- mention !
- add more cases of UB
- avoid redundant UB
- stick to broader UB for raw ptr offsets/derefs for now
- be more precise about dangling
- subsume the NonNull things as library types
- handle recursion in the heading
- Define 'producing'
- NonNull, NonZero*
- list more ptr offset computations
- UB
- Fix typo in subtyping
- Add colon to `MySuperSliceable` too
- Fix typo `str::mem` to `std::mem`

## reference

2 commits in b4b3536..d191a0c
2019-08-07 02:29:50 +0200 to 2019-08-15 08:42:23 +0200
- Fix warning in stable-check (rust-lang/reference#653)
- our closure syntax comes from Ruby (rust-lang/reference#650)

## rust-by-example

5 commits in f2c15ba5ee89ae9469a2cf60494977749901d764..580839d90aacd537f0293697096fa8355bc4e673
2019-08-07 10:14:25 -0300 to 2019-08-17 23:17:50 -0300
- macros.md: Changing Sometime to more appropriate adverb form Sometimes (rust-lang/rust-by-example#1243)
- Add colon after "See Also" (rust-lang/rust-by-example#1242)
- Update enter_question_mark.md (rust-lang/rust-by-example#1208)
- Add destructuring bind examples (rust-lang/rust-by-example#1238)
- Change initial parameters in `fibonacci()` call. (rust-lang/rust-by-example#1241)

## embedded-book

1 commits in c5da1e11915d3f28266168baaf55822f7e3fe999..432ca26686c11d396eed6a59499f93ce1bf2433c
2019-08-05 23:02:10 +0000 to 2019-08-09 23:20:22 +0000
- semihosting: add comment adding feature flag to panic-semihosting  (rust-embedded/book#203)
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.

None yet

3 participants