Skip to content

Commit 0943409

Browse files
bors[bot]krepl
andcommitted
Merge #128
128: Fix typos in c-tips r=adamgreig a=krepl Just some little typo fixes in "Tips for embedded C developers" Co-authored-by: krepl <36075613+krepl@users.noreply.github.com>
2 parents bd2778f + 16817be commit 0943409

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/c-tips/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ highlight how things you might already be used to in C are different in Rust.
66

77
## Preprocessor
88

9-
In embedded C it is very common to use the preprocessor for a varity of
9+
In embedded C it is very common to use the preprocessor for a variety of
1010
purposes, such as:
1111

1212
* Compile-time selection of code blocks with `#ifdef`
@@ -52,7 +52,7 @@ pub mod iir;
5252
```
5353

5454
You can similarly include code blocks only if a feature is _not_ enabled, or if
55-
any combination or features is or is not enabled.
55+
any combination of features are or are not enabled.
5656

5757
Additionally, Rust provides a number of automatically-set conditions you can
5858
use, such as `target_arch` to select different code based on architecture. For
@@ -62,7 +62,7 @@ full details of the conditional compilation support, refer to the
6262
[conditional compilation]: https://doc.rust-lang.org/reference/conditional-compilation.html
6363

6464
The conditional compilation will only apply to the next statement or block. If
65-
a block can not be used in the current scope then then `cfg` attribute will
65+
a block can not be used in the current scope then the `cfg` attribute will
6666
need to be used multiple times. It's worth noting that most of the time it is
6767
better to simply include all the code and allow the compiler to remove dead
6868
code when optimising: it's simpler for you and your users, and in general the

0 commit comments

Comments
 (0)