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++ - Structured Concurrency with Facebook’s Folly Library 8 minute read This post demonstrates how Facebook’s Folly library supports structured concurrency through its coroutine-based AsyncScope primitive. The example implements ...
C++ - Back to Basics: C++ Concepts 9 minute read Jeff Garland - Back to Basics: C++ Concepts - CppCon 2025
C++ - Working with Asynchrony Generally (Sender/Receiver) 6 minute read Eric Niebler - Working with Asynchrony Generally - CppEurope 2022
C++ - Type erasure 2 minute read Duck Typing, the C++ Way: How Type Erasure Bends the Rules - Sarthak Sehgal - CppCon 2025