Skip to content

Commit 345626f

Browse files
committed
Clarify wording in transmute example
* Change "four eights" to "four u8s" * Change "a 32" to "a u32"
1 parent 2fb6f8e commit 345626f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/book/casting-between-types.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ cast four bytes into a `u32`:
135135
```rust,ignore
136136
let a = [0u8, 0u8, 0u8, 0u8];
137137
138-
let b = a as u32; // four eights makes 32
138+
let b = a as u32; // four u8s makes a u32
139139
```
140140

141141
This errors with:
142142

143143
```text
144144
error: non-scalar cast: `[u8; 4]` as `u32`
145-
let b = a as u32; // four eights makes 32
145+
let b = a as u32; // four u8s makes a u32
146146
^~~~~~~~
147147
```
148148

0 commit comments

Comments
 (0)