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

nested destructure example for structs #1787

Merged

Conversation

arghav
Copy link
Contributor

@arghav arghav commented Dec 18, 2023

Added an example on how to destructure nested structs.

@rustbot
Copy link
Collaborator

rustbot commented Dec 18, 2023

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.

@arghav arghav changed the title docs: nested destructure example for structs nested destructure example for structs Dec 18, 2023
@marioidival marioidival merged commit 4c2b24f into rust-lang:master Dec 18, 2023
1 check passed
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 19, 2023
Update books

## rust-lang/edition-guide

2 commits in 34fca48ed284525b2f124bf93c51af36d6685492..bbffb074e16bef89772818b400b6c76a65eac126
2023-12-11 18:46:08 UTC to 2023-12-06 21:38:11 UTC

- Update links and text about rustfix. (rust-lang/edition-guide#287)
- Add C-string literals. (rust-lang/edition-guide#286)

## rust-embedded/book

1 commits in 22bca3d0f6e9b9b556689b54ce96f25b46ecd1b3..3f9df2b9885c6741365da2e12ed6662cd0e827d6
2023-12-11 21:22:20 UTC to 2023-12-11 21:22:20 UTC

- rust-lang#363 (rust-embedded/book#364)

## rust-lang/nomicon

2 commits in 83d015105e6d490fc30d6c95da1e56152a50e228..f6bd083c4ccfc4ce6699b8b4154e3c45c5a27a8c
2023-12-10 03:19:24 UTC to 2023-12-10 03:18:32 UTC

- Minor improvements to Vec (rust-lang/nomicon#415)
- Improve the `PhantomData` table (rust-lang/nomicon#417)

## rust-lang/reference

1 commits in 692d216f5a1151e8852ddb308ba64040e634c876..f9f5b5babd95515e7028c32d6ca4d9790f64c146
2023-12-10 16:16:17 UTC to 2023-12-10 16:16:17 UTC

- Document object unsafety of async-fn-in-trait  (rust-lang/reference#1435)

## rust-lang/rust-by-example

11 commits in da0a06aada31a324ae84a9eaee344f6a944b9683..4c2b24ff9d9cf19f2fcff799a3a49b9a2c50ae8e
2023-12-18 13:02:23 UTC to 2023-12-10 12:10:43 UTC

- nested destructure example for structs (rust-lang/rust-by-example#1787)
- Make example in pipe.md compatible with both Windows and Unix-type system with less code (rust-lang/rust-by-example#1780)
- Add i18n support (rust-lang/rust-by-example#1760)
- Add pub keyword before mod bar definition in doc.md (rust-lang/rust-by-example#1785)
- Update address and title of github source of rust playground in playground.md (rust-lang/rust-by-example#1784)
- Update example in ffi.md to make it compatible with both Windows OS and Unit-type systems (rust-lang/rust-by-example#1781)
- Update the path of html_playground_url in playground.md (rust-lang/rust-by-example#1783)
- Update unit_testing.md ignore running the last example because it's test (rust-lang/rust-by-example#1782)
- Update example in fs.md and use target_family instead of target_os (rust-lang/rust-by-example#1779)
- Update the example in pipe.md to make it compatible with both Windows OS and Unix-type systems (rust-lang/rust-by-example#1778)
- Update the example in fs.md to ensure compatibility with both Window and Unix-type systems. (rust-lang/rust-by-example#1777)

## rust-lang/rustc-dev-guide

7 commits in 904bb5aa7b21adad58ffae610e2830c7b0f813b0..0610665a8687b1b0aa037917a1598b9f2a21e3ef
2023-12-17 17:21:38 UTC to 2023-12-05 16:40:26 UTC

- add a mailmap (rust-lang/rustc-dev-guide#1839)
- Move Editions chapter to "Contributing to Rust". (rust-lang/rustc-dev-guide#1838)
- Remove feature edition fields. (rust-lang/rustc-dev-guide#1836)
- Add a chapter on editions. (rust-lang/rustc-dev-guide#1835)
- Remove mentions of plugin lints (rust-lang/rustc-dev-guide#1833)
- Fix typo of unused_parens (rust-lang/rustc-dev-guide#1832)
- Replace experts map with reviewers from triagebot (rust-lang/rustc-dev-guide#1831)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 19, 2023
Rollup merge of rust-lang#119087 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/edition-guide

2 commits in 34fca48ed284525b2f124bf93c51af36d6685492..bbffb074e16bef89772818b400b6c76a65eac126
2023-12-11 18:46:08 UTC to 2023-12-06 21:38:11 UTC

- Update links and text about rustfix. (rust-lang/edition-guide#287)
- Add C-string literals. (rust-lang/edition-guide#286)

## rust-embedded/book

1 commits in 22bca3d0f6e9b9b556689b54ce96f25b46ecd1b3..3f9df2b9885c6741365da2e12ed6662cd0e827d6
2023-12-11 21:22:20 UTC to 2023-12-11 21:22:20 UTC

- rust-lang#363 (rust-embedded/book#364)

## rust-lang/nomicon

2 commits in 83d015105e6d490fc30d6c95da1e56152a50e228..f6bd083c4ccfc4ce6699b8b4154e3c45c5a27a8c
2023-12-10 03:19:24 UTC to 2023-12-10 03:18:32 UTC

- Minor improvements to Vec (rust-lang/nomicon#415)
- Improve the `PhantomData` table (rust-lang/nomicon#417)

## rust-lang/reference

1 commits in 692d216f5a1151e8852ddb308ba64040e634c876..f9f5b5babd95515e7028c32d6ca4d9790f64c146
2023-12-10 16:16:17 UTC to 2023-12-10 16:16:17 UTC

- Document object unsafety of async-fn-in-trait  (rust-lang/reference#1435)

## rust-lang/rust-by-example

11 commits in da0a06aada31a324ae84a9eaee344f6a944b9683..4c2b24ff9d9cf19f2fcff799a3a49b9a2c50ae8e
2023-12-18 13:02:23 UTC to 2023-12-10 12:10:43 UTC

- nested destructure example for structs (rust-lang/rust-by-example#1787)
- Make example in pipe.md compatible with both Windows and Unix-type system with less code (rust-lang/rust-by-example#1780)
- Add i18n support (rust-lang/rust-by-example#1760)
- Add pub keyword before mod bar definition in doc.md (rust-lang/rust-by-example#1785)
- Update address and title of github source of rust playground in playground.md (rust-lang/rust-by-example#1784)
- Update example in ffi.md to make it compatible with both Windows OS and Unit-type systems (rust-lang/rust-by-example#1781)
- Update the path of html_playground_url in playground.md (rust-lang/rust-by-example#1783)
- Update unit_testing.md ignore running the last example because it's test (rust-lang/rust-by-example#1782)
- Update example in fs.md and use target_family instead of target_os (rust-lang/rust-by-example#1779)
- Update the example in pipe.md to make it compatible with both Windows OS and Unix-type systems (rust-lang/rust-by-example#1778)
- Update the example in fs.md to ensure compatibility with both Window and Unix-type systems. (rust-lang/rust-by-example#1777)

## rust-lang/rustc-dev-guide

7 commits in 904bb5aa7b21adad58ffae610e2830c7b0f813b0..0610665a8687b1b0aa037917a1598b9f2a21e3ef
2023-12-17 17:21:38 UTC to 2023-12-05 16:40:26 UTC

- add a mailmap (rust-lang/rustc-dev-guide#1839)
- Move Editions chapter to "Contributing to Rust". (rust-lang/rustc-dev-guide#1838)
- Remove feature edition fields. (rust-lang/rustc-dev-guide#1836)
- Add a chapter on editions. (rust-lang/rustc-dev-guide#1835)
- Remove mentions of plugin lints (rust-lang/rustc-dev-guide#1833)
- Fix typo of unused_parens (rust-lang/rustc-dev-guide#1832)
- Replace experts map with reviewers from triagebot (rust-lang/rustc-dev-guide#1831)
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