rtic/book/en/src/by-example/tips_destructureing.md

15 lines
374 B
Markdown
Raw Normal View History

2021-09-22 13:22:45 +02:00
# Resource de-structure-ing
2021-12-18 22:36:11 +01:00
Destructuring task resources might help readability if a task takes multiple
resources.
Here are two examples on how to split up the resource struct:
2021-09-22 13:22:45 +02:00
``` rust
{{#include ../../../../examples/destructure.rs}}
```
``` console
$ cargo run --target thumbv7m-none-eabi --example destructure
{{#include ../../../../ci/expected/destructure.run}}
```