Projects
/ Programming languages
/ Advanced
🧭 Design an error type the caller can branch on
☆ Read later
Free
About 4 hours
Needs: Rust up to lesson 33 (Result and error handling). Not runnable in the browser
Take first: Rust for Beginners
What you end up with
An error type the caller can split three ways: fall back if it is missing, ask for a fix if it is out of range, stop otherwise. Add a kind and E0004 lists every place to change.
🔒
Create a free account to read this project
Sign up for a free membership to read every free project. Already have an account? Please sign in.
Report a problem with this project
Log in to send a report.
What to build next
Advanced
🔑
You look up a key you know you put in, and get null back. There are four causes, and all of them compile. You measure how entries become unreachable, sort out what a record fixes and what it doesn't, and finish by making the keys immutable.
Advanced
🐹
A goroutine you start with go doesn't end until someone stops it. You count 100 of them lingering after a timeout gives up, find the line where they're stuck, stop them with channels and context, and pin down "no leaks" with a test.
Advanced
🧨
Pass a long name to the function that builds display names, and the is_admin field next to it gets overwritten. You pin down which byte spilled over with ASan, see why strncpy does not fix it, rebuild the API so it takes the buffer size, and lock the edges down with tests.
← Back to all projects