Don't You Love Rust Validation
Don't you love #Rust? fn validate(&self) -> Result<()> { match ( self.recipe_template.contains(VAR_URL), self.recipe_template.contains(VAR_SHA), self.recipe_template.contains(VAR_VERSION), ) { (false, _, _) => bail!("missing URL variable"), (_, false, _) => bail!("missing SHA variable"), (_, _, false) => bail!("missing VERSION variable"), (_, _, _) => {} } Ok(()) }
A screenshot of a social media post praising Rust displays a Rust validation function that checks whether URL, SHA, and version variables are present, returning an error when any are missing. The joke is that Rust’s explicit, exhaustive error handling is presented as something to love, making this a reaction meme for Rust programmers and software developers who appreciate or tease the language’s strictness. EN: A screenshot of a social media post praising Rust displays a Rust validation function that checks whether URL, SHA, and version variables are present, returning an error when any are missing. The joke is that Rust’s explicit, exhaustive error handling is presented as something to love, making this a reaction meme for Rust programmers and software developers who appreciate or tease the language’s strictness.
- @gentoomemes / 11129 2024-05-07
- Template
- programming tweet screenshot
- Type
- image
- Size
- 576×669 · 54.4 KiB
- Mood
- sarcastic
- Language
- en
- Added