Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Rust Programming Tutorial #14 – Code Blocks

24.6K views on YouTube

dcode 42 tutorials here

In this video I go over the concept of ‘code blocks’ which essentially just means to isolate a block of code from it’s surrounding scope.

These blocks of code have access to the outer scope most of the time and once destroyed, any variable bindings made inside it are no longer existent to the scope it was defined in.

If this video helped you out and you’d like to see more, make sure to leave a like and subscribe to dcode!