#RustTricks
⚡ #Rustlang Tip: Speed up dev cycles by using cargo check instead of cargo build during development

It skips building everything but still checks your code for any compilation errors!
You can also use cargo watch to automatically run cargo check!

#RustTricks #Rust30by30 #Day8
October 2, 2024 at 4:16 PM
⚡ #Rustlang Tip: use Option for values that might be absent.

Rust doesn't have null values, but it does have Option

This lets the compiler help check for those pesky "null" cases for you, and make sure you handle the Option::None case!

#RustTricks #Rust30by30 #Day9
October 3, 2024 at 7:51 PM
🏗️ #Rustlang Tip: Use the #[derive(Default)] attribute for struct initialization if all your fields have a Default implementation.

Be careful though, for Strings field, the default implementation will create an empty string!

#RustTricks #Rust30by30 #Day10
October 4, 2024 at 4:16 PM