Rust vector iteration less than 1 minute read The following example shows difference of iterating vector items between for and with iter() method 1 2 3 4 let vs = vec![1, 2, 3]; for (v : vs) { // consumes v, owned v } 1 2 3 4 let vs = vec![1, 2, 3]; for (v : &vs) { // borrows vs, & v } 1 2 3 4 let vs = vec![1, 2, 3]; for (v : vs.iter()) { // this is equivalent to for (v: &vs) } 1 2 3 4 let vs = vec![1, 2, 3]; for (v : vs.into_iter()) { // this is equivalent to for (v: vs) } Share on Twitter Facebook LinkedIn Previous Next
C++ - std::initializer_list is a view of a temporary const array (Okade & Bhattacharyya, ACCU on Sea 2026) 5 minute read Demystifying C++ initializer_list - Design, Behavior, and Best Practices (slides)
C++ - C++23’s Quiet Features Fix Everyday Traps (Nicolai Josuttis, ACCU on Sea 2026) 5 minute read Taming C++23 - The Things About C++23 You Do Not Know - Nicolai M. Josuttis - ACCU on Sea 2026 (slides)
C++ - Immediately Invoked Coroutine Lambdas: Lifetime Pitfalls and Best Practices (Jonathan Müller, ACCU 2025) 3 minute read Jonathan Müller - Immediately Invoked Coroutine Lambdas in C++23: Lifetime Pitfalls and Best Practices - ACCU 2025 Short Talks
C++ - How a Coroutine Actually Works: Return Type, Promise, Awaiter, and the Frame 18 minute read A C++20 coroutine is an ordinary-looking function whose body contains co_await, co_yield, or co_return. There is no coroutine keyword, no base class to deriv...