Pinchflat

Rust's For Loop Is Smarter Than You Think | Advanced Rust Part 12

Raw Attributes

Source: Advanced Rust
  • media_id: vaCBlj4D1sY
  • duration_seconds: 673
  • predicted_media_filepath: /downloads/chris/tubes/Advanced Rust_[PLFdNoRgzggbr7tkQsO4VrF1UGy0ji9sZl]/Season 2025/s2025e051600_Rust's For Loop Is Smarter Than You Think | Advanced Rust Part 12.mp4
  • short_form_content: false
  • upload_date_index: 0
  • nfo_filepath: /downloads/chris/tubes/Advanced Rust_[PLFdNoRgzggbr7tkQsO4VrF1UGy0ji9sZl]/Season 2025/s2025e051600_Rust's For Loop Is Smarter Than You Think | Advanced Rust Part 12.nfo
  • media_filepath: /downloads/chris/tubes/Advanced Rust_[PLFdNoRgzggbr7tkQsO4VrF1UGy0ji9sZl]/Season 2025/s2025e051600_Rust's For Loop Is Smarter Than You Think | Advanced Rust Part 12.mp4
  • description: To try everything Brilliant has to offer—free—for a full 30 days, visit https://brilliant.org/GreenTeaCoding/ . You’ll also get 20% off an annual premium subscription. Watch the rest of this series: https://www.youtube.com/playlist?list=PLFdNoRgzggbr7tkQsO4VrF1UGy0ji9sZl New to Rust? Check out my fundamentals series: https://www.youtube.com/playlist?list=PLFdNoRgzggbo6BqJQ6tqk_wvXeI5yfbGA Rust's for loop looks simple — but under the hood, it's a masterclass in trait design. In this video, we break down how `for item in &vec` actually works, why `IntoIterator` is implemented on references, and what this teaches us about designing our own traits. We'll also unpack the desugaring of for loops, explain why `Deref` isn't enough to make iteration work on references, and highlight a key insight: how trait method receivers (`self` vs `&self`) change everything about how implementations behave — and why that’s a feature, not a limitation. Whether you're curious about auto-borrowing, reference-based trait impls, or just love seeing how elegant Rust’s internals are, this episode delivers. ⏱️ Perfect for intermediate-to-advanced Rust devs who want to sharpen their understanding of ownership, iteration, and trait design. Find me elsewhere: 🐘 Mastodon: https://mastodon.social/@GreenTeaCoding #rustlang #advancedrust #rustprogramming #forloop #intorust #rusttraits #rustiterators #ownership #zerocostabstractions Chapters: 00:00 Desugaring the for loop 02:15 Ownership vs Borrowing 03:12 Brilliant Sponsorship 04:33 IntoIterator 06:04 Vec's IntoIterator 08:31 Impl on &T 11:12 Outro This video was sponsored by Brilliant
  • updated_at: 2025-05-18T02:00:19Z
  • id: 439966
  • media_size_bytes: 27120038
  • inserted_at: 2025-05-14T03:18:55Z
  • media_redownloaded_at: 2025-05-18T02:00:19Z
  • prevent_culling: false
  • source_id: 22
  • original_url: https://www.youtube.com/watch?v=vaCBlj4D1sY
  • uuid: 8cda9568-d043-47a2-9802-6ab8543e98d3
  • matching_search_term:
  • metadata_filepath: /downloads/chris/tubes/Advanced Rust_[PLFdNoRgzggbr7tkQsO4VrF1UGy0ji9sZl]/Season 2025/s2025e051600_Rust's For Loop Is Smarter Than You Think | Advanced Rust Part 12.info.json
  • uploaded_at: 2025-05-16T13:01:47Z
  • thumbnail_filepath: /downloads/chris/tubes/Advanced Rust_[PLFdNoRgzggbr7tkQsO4VrF1UGy0ji9sZl]/Season 2025/s2025e051600_Rust's For Loop Is Smarter Than You Think | Advanced Rust Part 12-thumb.jpg
  • prevent_download: false
  • tasks:
  • title: Rust's For Loop Is Smarter Than You Think | Advanced Rust Part 12
  • last_error:
  • culled_at:
  • subtitle_filepaths:
  • media_downloaded_at: 2025-05-18T02:00:15Z
  • livestream: false
  • playlist_index: 12

Nothing Here!