aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/tips_destructureing.md
blob: ab27987a56b48c76ea77f30b6540ac1f90faff2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Resource de-structure-ing

Destructuring task resources might help readability if a task takes multiple
resources. Here are two examples on how to split up the resource struct:

``` rust
{{#include ../../../../rtic/examples/destructure.rs}}
```

``` console
$ cargo run --target thumbv7m-none-eabi --example destructure
```
``` console
{{#include ../../../../rtic/ci/expected/destructure.run}}
```