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

14 lines
376 B
Markdown
Raw Normal View History

2021-09-22 13:22:45 +02:00
# Resource de-structure-ing
When having a task taking multiple resources it can help in readability to split
up the resource struct. Here are two examples on how this can be done:
``` rust
{{#include ../../../../examples/destructure.rs}}
```
``` console
$ cargo run --target thumbv7m-none-eabi --example destructure
{{#include ../../../../ci/expected/destructure.run}}
```