Skip to content

Commit 5306a5d

Browse files
tmandryVeykrilehuss
authored
Apply suggestions from code review
Co-authored-by: Lukas Wirth <[email protected]> Co-authored-by: Eric Huss <[email protected]>
1 parent 246735e commit 5306a5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

posts/2022-12-15-Rust-1.66.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ enum Bar {
5454
}
5555
```
5656

57-
Here the `Foo` enum is guaranteed to have the same layout as `u8`. Each variant will use either the specified discriminant value or default to starting with 0.
57+
Here the `Bar` enum is guaranteed to have the same layout as `u8`. Each variant will use either the specified discriminant value or default to starting with 0.
5858

5959
```rust
6060
assert_eq!(0, Bar::A as u8);
@@ -68,7 +68,7 @@ Starting in Rust 1.66.0, the above example compiles, allowing you to use explici
6868

6969
### `core::hint::black_box`
7070

71-
When benchmarking or examining the machine code produced by a compiler, it's often useful to prevent optimizations from ocurring in certain places. In the following example, the function `push_cap` executes `Vec::push` 4 times in a loop:
71+
When benchmarking or examining the machine code produced by a compiler, it's often useful to prevent optimizations from occurring in certain places. In the following example, the function `push_cap` executes `Vec::push` 4 times in a loop:
7272

7373
```rust
7474
fn push_cap(v: &mut Vec<i32>) {

0 commit comments

Comments
 (0)