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 #15 – Shadowing

26.6K views on YouTube

dcode 42 tutorials here

Okay so in this video I talk you through the concept of ‘shadowing’ in Rust – which is almost like re-assigning a variable within the scope that you’re currently in.

You can use it to have independent versions of your variables within inner-scopes and freely do modifications on it without having to worry about the effects it would normally have on the outer scope.

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