aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/tips/destructureing.md
blob: feaa74b31e01e99b8f4da7c4d90175f6334cb3e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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,noplayground
{{#include ../../../../../examples/lm3s6965/examples/destructure.rs}}
```

```console
$ cargo xtask qemu --verbose --example destructure
```

```console
{{#include ../../../../../ci/expected/lm3s6965/destructure.run}}
```