Alignment change on grow/shrink
Hey, I'm currently implementing a bump allocator to learn about the Allocator trait. The documentation for grow and shrink states: Note that new_layout.align() need not be the same as old_layout.align(). My intuition…
Topic - Edition
Hey, I'm currently implementing a bump allocator to learn about the Allocator trait. The documentation for grow and shrink states: Note that new_layout.align() need not be the same as old_layout.align(). My intuition…
I've defined this simple struct for a lexer: struct Lexer<'a> { source: &'a [u8], pos: usize, } For convenience, I've implemented std::ops::Index so that I can write lexer[begin..end] instead of…