Skip to content

Commit 9a01cb2

Browse files
authored
Fix syntax error (#61)
1 parent b3c239a commit 9a01cb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

booksrc/chapter-simple-bump.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl BumpBlock {
4949
let cursor_ptr = self.cursor as usize;
5050
5151
// align to word boundary
52-
let align_mask = usize = !(size_of::<usize>() - 1);
52+
let align_mask: usize = !(size_of::<usize>() - 1);
5353
5454
let next_ptr = cursor_ptr.checked_sub(alloc_size)? & align_mask;
5555
@@ -73,7 +73,7 @@ object. Fortunately, by bump allocating downward we can apply a simple mask to t
7373
pointer to align it down to the nearest word:
7474

7575
```rust,ignore
76-
let align_mask = usize = !(size_of::<usize>() - 1);
76+
let align_mask: usize = !(size_of::<usize>() - 1);
7777
```
7878

7979
In initial implementation, allocation will simply return `None` if the block

0 commit comments

Comments
 (0)