Guest User

Untitled

a guest
Feb 15th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. struct X(Vec<u8>);
  2.  
  3. impl Drop for X {
  4. fn drop(&mut self) {}
  5. }
  6.  
  7. fn main() {
  8. let x = Some(X(vec![4]));
  9.  
  10. match x {
  11. Some(X(list)) => {
  12. // i want to own list here, not clone it
  13. }
  14. None => {}
  15. }
  16. }
Add Comment
Please, Sign In to add comment