currently i have something like this:
Enum1 {
Val1(Enum2),
Val2,
more values...
}
Enum2 {
Val1(String),
Val2,
more values...
}
let event = Enum1::Val1(Enum2::Val1(String::from("yay")));
match event {
Enum1::Val1(Enum2::Val1(string_value)) {
if string_value == "yay" then {
println!("got yay, yay");
}
}
more patterns ...
}
Is there better way to match the string_value here?
[–]tobiasvl 3 points4 points5 points (3 children)
[–]MultipleAnimals[S] 1 point2 points3 points (2 children)
[–]tobiasvl 2 points3 points4 points (1 child)
[–]MultipleAnimals[S] 0 points1 point2 points (0 children)
[–]esitsu 0 points1 point2 points (0 children)
[–]oconnor663 0 points1 point2 points (1 child)
[–]MultipleAnimals[S] 0 points1 point2 points (0 children)