You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that we need both the enum name and the variant name: `StringResult::StringOK`, but
1181
-
we didn't need to with `Ordering`, we just said `Greater` rather than `Ordering::Greater`.
1182
-
There's a reason: the Rust prelude imports the variants of `Ordering` as well as the enum
1183
-
itself. We can use the `use` keyword to do something similar with `StringResult`:
1179
+
Notice that we need both the enum name and the variant name: `StringResult::StringOK`, but we can use the `use` keyword to prevent having to call `StringResult::StringOK` every time we want to use the `StringOK` variant:
0 commit comments