Lifelong Learner π± | Base Creator Circle π | Building Khel.fun & Zkulture π οΈ | ZK πͺ| Superteam UK Founder member π¬π§ | Early Contributor @starknet |
26 Followers
π¦ Day 19 of #30DaysOfRust Rustβs module system is π₯ β Organize code with mod β Control visibility with pub β Simplify paths with use Think of modules like folders & filesβclean, scoped, and powerful πΌ Mastering this = clean, scalable Rust!
Day 27 of #30DaysOfRust π¦ π¨ Rust Panic! β When Rust says βNopeβ π¨ Sometimes code hits an unrecoverable error. Rustβs answer? panic! Two causes: 1οΈβ£ You call panic! directly 2οΈβ£ Rust detects something illegal (like an out-of-bounds index) π‘ Why panic? In languages like C, this could read random memory β a security risk! Rust stops execution to keep you safe. π Debug with backtraces to find the exact source of the problem. βοΈ Panic modes: Unwind (default) β cleans up + exits Abort β smaller, faster binary β Use panic for unexpected, unrecoverable bugs. Handle the rest with Result. Rust panics = guardrails π‘οΈ
Happy 10th Birthday ETH π Ten years. That's 3,652 days. 87,648 hours. 5,258,880 minutes. 315,532,800 seconds... of zero downtime. No hotline. No CEO. No "maintenance window". Just code. Just coordination. Just conviction β block after block π§© Believe in ETH π―
Day 28 of #30DaysOfRust π¦ Stop writing the same function twice in @rustlang ! Whether itβs i32 or charβ¦ You can use Generics to handle any type with one function.