aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPriit Laes <[email protected]>2024-02-09 10:14:34 +0200
committerPriit Laes <[email protected]>2024-02-09 10:14:34 +0200
commitbb743420be5f7347cab7e2cc19a427b93e90b1e8 (patch)
tree415a40f13598f5ab8bf6facc210ea3012c241d8c /docs
parentb326ee19bbd65e553e6891c08f623e5acdd95375 (diff)
faq: Fix typo
Diffstat (limited to 'docs')
-rw-r--r--docs/modules/ROOT/pages/best_practices.adoc6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/modules/ROOT/pages/best_practices.adoc b/docs/modules/ROOT/pages/best_practices.adoc
index 1e02f9ba9..bfcedec06 100644
--- a/docs/modules/ROOT/pages/best_practices.adoc
+++ b/docs/modules/ROOT/pages/best_practices.adoc
@@ -3,8 +3,10 @@
3Over time, a couple of best practices have emerged. The following list should serve as a guideline for developers writing embedded software in _Rust_, especially in the context of the _Embassy_ framework. 3Over time, a couple of best practices have emerged. The following list should serve as a guideline for developers writing embedded software in _Rust_, especially in the context of the _Embassy_ framework.
4 4
5== Passing Buffers by Reference 5== Passing Buffers by Reference
6It may be tempting to pass arrays or wrappers, like link:https://docs.rs/heapless/latest/heapless/[`heapless::Vec`], to a function or return one just like you would with a `std::Vec`. However, in most embedded applications you don't want to spend ressources on an allocator and end up placing buffers on the stack. 6It may be tempting to pass arrays or wrappers, like link:https://docs.rs/heapless/latest/heapless/[`heapless::Vec`],
7This, however, can easily blow up your stack if you are not careful. 7to a function or return one just like you would with a `std::Vec`. However, in most embedded applications you don't
8want to spend resources on an allocator and end up placing buffers on the stack. This, however, can easily blow up
9your stack if you are not careful.
8 10
9Consider the following example: 11Consider the following example:
10[,rust] 12[,rust]