#learningrust — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #learningrust, aggregated by home.social.
-
Thanks to the bank holiday (in Germany) I had some time to finish the third part of my **Learning Rust** post series!
This part is all about structs, tuples and (crazy) enums!
And of course some MIRs again, what else?
https://lukasrotermund.de/posts/structs-enums-and-pattern-matching-in-rust/
-
Ah, yet another aspiring "author" 📝 thinks the world needs a #book about #Ruby that it never asked for. But don't worry, it'll be ready sometime before the heat death of the universe. 🚀 Why bother with actual #innovation when you can just repackage the same boring tech jargon with a sprinkle of "I'm learning Rust"? 🙄
https://patshaughnessy.net/2025/11/17/compiling-ruby-to-machine-language #Overload #TechJargon #LearningRust #AspiringAuthors #HackerNews #ngated -
Understanding string slicing in #RustLang 🦀:
Remember: slices are based on bytes, not characters! Slicing an ASCII string is different from slicing a multibyte Unicode string. If you slice incorrectly, Rust will panic at runtime. ⚠️
let multibyte_string = "España";
let slice_multibyte = &multibyte_string[..5]; // This will panic! 🚫Ensure your slices align with valid UTF-8 character boundaries.
#Programming #CodeTips #LearningRust #RustCommunity #Unicode
-
Understanding string slicing in #RustLang 🦀:
Remember: slices are based on bytes, not characters! Slicing an ASCII string is different from slicing a multibyte Unicode string. If you slice incorrectly, Rust will panic at runtime. ⚠️
let multibyte_string = "España";
let slice_multibyte = &multibyte_string[..5]; // This will panic! 🚫Ensure your slices align with valid UTF-8 character boundaries.
#Programming #CodeTips #LearningRust #RustCommunity #Unicode
-
Understanding string slicing in #RustLang 🦀:
Remember: slices are based on bytes, not characters! Slicing an ASCII string is different from slicing a multibyte Unicode string. If you slice incorrectly, Rust will panic at runtime. ⚠️
let multibyte_string = "España";
let slice_multibyte = &multibyte_string[..5]; // This will panic! 🚫Ensure your slices align with valid UTF-8 character boundaries.
#Programming #CodeTips #LearningRust #RustCommunity #Unicode
-
Understanding string slicing in #RustLang 🦀:
Remember: slices are based on bytes, not characters! Slicing an ASCII string is different from slicing a multibyte Unicode string. If you slice incorrectly, Rust will panic at runtime. ⚠️
let multibyte_string = "España";
let slice_multibyte = &multibyte_string[..5]; // This will panic! 🚫Ensure your slices align with valid UTF-8 character boundaries.
#Programming #CodeTips #LearningRust #RustCommunity #Unicode
-
Understanding string slicing in #RustLang 🦀:
Remember: slices are based on bytes, not characters! Slicing an ASCII string is different from slicing a multibyte Unicode string. If you slice incorrectly, Rust will panic at runtime. ⚠️
let multibyte_string = "España";
let slice_multibyte = &multibyte_string[..5]; // This will panic! 🚫Ensure your slices align with valid UTF-8 character boundaries.
#Programming #CodeTips #LearningRust #RustCommunity #Unicode