Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum E<T> {
- A(T),
- B(T),
- }
- impl<T> E<T> {
- fn to_b(self) -> E<T> {
- match self {
- E::A(t) => E::B(t),
- _=> panic!(),
- }
- }
- }
- fn main() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement