From e51146a98cc7c83ea574d13b4b5d8e7ceeeb004b Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sun, 23 Apr 2023 13:22:35 +0200 Subject: Move tips into their own subdir --- book/en/src/by-example/tips/destructureing.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 book/en/src/by-example/tips/destructureing.md (limited to 'book/en/src/by-example/tips/destructureing.md') diff --git a/book/en/src/by-example/tips/destructureing.md b/book/en/src/by-example/tips/destructureing.md new file mode 100644 index 0000000..6e1d796 --- /dev/null +++ b/book/en/src/by-example/tips/destructureing.md @@ -0,0 +1,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}} +``` -- cgit v1.2.3 From a66540efa014b3716d252612bfc7f8f17ed765c4 Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sun, 23 Apr 2023 15:33:56 +0200 Subject: Disable the playground on all of these --- book/en/src/by-example/tips/destructureing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'book/en/src/by-example/tips/destructureing.md') diff --git a/book/en/src/by-example/tips/destructureing.md b/book/en/src/by-example/tips/destructureing.md index 6e1d796..752311d 100644 --- a/book/en/src/by-example/tips/destructureing.md +++ b/book/en/src/by-example/tips/destructureing.md @@ -3,7 +3,7 @@ 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 +``` rust,noplayground {{#include ../../../../../rtic/examples/destructure.rs}} ``` -- cgit v1.2.3