SHARE
TWEET

Untitled

a guest Oct 21st, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enum E<T> {
  2.   A(T),
  3.   B(T),
  4. }
  5.  
  6. impl<T> E<T> {
  7.     fn to_b(self) -> E<T> {
  8.         match self {
  9.             E::A(t) => E::B(t),
  10.             _=> panic!(),
  11.         }
  12.     }
  13. }
  14.  
  15. fn main() {}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top