Skip to content

Commit

Permalink
Fix syntax error (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
abcSup authored Jul 27, 2024
1 parent b3c239a commit 9a01cb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions booksrc/chapter-simple-bump.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl BumpBlock {
let cursor_ptr = self.cursor as usize;
// align to word boundary
let align_mask = usize = !(size_of::<usize>() - 1);
let align_mask: usize = !(size_of::<usize>() - 1);
let next_ptr = cursor_ptr.checked_sub(alloc_size)? & align_mask;
Expand All @@ -73,7 +73,7 @@ object. Fortunately, by bump allocating downward we can apply a simple mask to t
pointer to align it down to the nearest word:

```rust,ignore
let align_mask = usize = !(size_of::<usize>() - 1);
let align_mask: usize = !(size_of::<usize>() - 1);
```

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

0 comments on commit 9a01cb2

Please sign in to comment.