mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-05-15 09:48:45 +00:00
Update hint of enums2
This was discussed in another PR, but it was merged before the code was updated to the most recent consensus: https://github.com/rust-lang/rustlings/pull/2353 Co-authored-by: Piotr Spieker <p.spieker@posteo.de>
This commit is contained in:
parent
0907e65245
commit
d9e0b103c4
@ -438,8 +438,14 @@ name = "enums2"
|
||||
dir = "08_enums"
|
||||
test = false
|
||||
hint = """
|
||||
You can create enumerations that have different variants with different types
|
||||
such as struct-like, tuple-like and unit-only variants."""
|
||||
Enum variants can be defined using three different forms: struct-, tuple- and
|
||||
unit-like. Here's an example enum definition, which uses all three forms:
|
||||
|
||||
enum EnumUsingAllVariantForms {
|
||||
StructLike { named_field: bool },
|
||||
TupleLike(bool),
|
||||
UnitLike,
|
||||
}"""
|
||||
|
||||
[[exercises]]
|
||||
name = "enums3"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user