mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-08 03:39:18 +00:00
This will cause the function to keep failing, In order to pass I needed to remove a pair of quotes, not sure if this was intentional and my solution was wrong, but this was the only solution I was able to come up with.
Enums
Rust allows you to define types called "enums" which enumerate possible values. Enums are a feature in many languages, but their capabilities differ in each language. Rust’s enums are most similar to algebraic data types in functional languages, such as F#, OCaml, and Haskell. Useful in combination with enums is Rust's "pattern matching" facility, which makes it easy to run different code for different values of an enumeration.