GridVids
Sign in with YouTube

Rust's shortest function is more complicated than you might think.

Dreams of Code Jul 12, 2026 15:00
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Don't Miss
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Mark watched
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Hide
Open in popup Open on YouTube
Share video

Share video

Copy the GridVids link or iframe code.

Video link
Iframe code
Iframe content

To get your own long term VPS, and protect yourself against the rising cost of memory, then visit https://hostinger.com/dreamsofcode and use my coupon DREAMSOFCODE when checking out to save an additional 10% off. Ever since the rise of Agentic A.I., I've found myself moving further and further away from understanding and diving deep into programming languages. Recently, I've decided to rectify this, and so I've been again writing code by hand. In doing so, I came across a rather interesting function in the Rust standard library, one that has an implementation which is exactly zero lines long. Despite this length, however, it happens to still be quite useful, and so I decided to do a deep dive as to how that's even possible. This video is sponsored by Hostinger. Links: - std::mem module: https://doc.rust-lang.org/std/mem/index.html Watch my course on building cli applications in Go: https://dreamsofcode.io/courses/cli-apps-go/learn 👈 How I edit my videos: https://getkiru.app My Gear: - Camera: https://amzn.to/3E3ORuX - Microphone: https://amzn.to/40wHBPP - Audio Interface: https://amzn.to/4jwbd8o - Headphones: https://amzn.to/4gasmla - Keyboard: ZSA Voyager Join this channel to get access to perks: https://www.youtube.com/channel/UCWQaM7SpSECp9FELz-cHzuQ/join Join Discord: https://discord.com/invite/eMjRTvscyt Join Twitter: https://twitter.com/dreamsofcode_io
Science & Technology