Communities:
Rust 🦀 Developers
| # | Tweet | Community | Topic | Views ▼ | Ratio | Engagement | Posted |
|---|---|---|---|---|---|---|---|
| 1 | [image] Completed the custom Vec<T> in Rust from scratch
Implemented:
→ push()
→ pop()
→ get()
→ Drop + heap memory deallocation
→ Iterators
Now taking it further with:
reserve() · clear() · first() · last() · iter_mut() · IntoIterator · DoubleEndedIterator · FromIterator
The | Rust 🦀 Developers | — | 156 | 0.4x | 6 | Sep 17 |
| 2 | [image] println! before push() → works
println! after push() → compiler says nope
Turns out push() can reallocate the Vec and invalidate the reference | Rust 🦀 Developers | — | 60 | 0.2x | 5 | Sep 25 |