Skip to content

Commit 4a2c521

Browse files
committed
A couple of typos
1 parent 38269ba commit 4a2c521

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/peripherals/a-first-attempt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn do_something() {
6565
}
6666
```
6767

68-
But the problem with this is that our `SerialPort` struct could be created anywhere. By creating multiple instances if `SerialPort`, we would create aliased mutable pointers, which are typically avoided in Rust.
68+
But the problem with this is that our `SerialPort` struct could be created anywhere. By creating multiple instances of `SerialPort`, we would create aliased mutable pointers, which are typically avoided in Rust.
6969

7070
Consider the following example:
7171

src/peripherals/borrowck.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Unfortunately, hardware is basically nothing but mutable global state, which can
77
How can we reliably interact with these peripherals?
88

99
1. Always use `volatile` methods to read or write to peripheral memory, as it can change at any time
10-
2. In software, ee should be able to share any number of read-only accesses to these peripherals
10+
2. In software, we should be able to share any number of read-only accesses to these peripherals
1111
3. If some software should have read-write access to a peripheral, it should hold the only reference to that peripheral
1212

1313
## The Borrow Checker
@@ -16,4 +16,4 @@ The last two of these rules sound suspiciously exactly like what the Borrow Chec
1616

1717
Imagine if we could pass around ownership of these peripherals, or offer immutable or mutable references to them?
1818

19-
Well, we can, but for the Borrow Checker, we need to have exactly one instance of each peripheral, so Rust can handle this correctly. Well, luckliy in the hardware, there is only one instance of any given peripheral, but how can we expose that in the structure of our code?
19+
Well, we can, but for the Borrow Checker, we need to have exactly one instance of each peripheral, so Rust can handle this correctly. Well, luckliy in the hardware, there is only one instance of any given peripheral, but how can we expose that in the structure of our code?

0 commit comments

Comments
 (0)