O'Reilly logo
  • Shuo Li thinks this is interesting:

#[derive(Copy)] struct MagicNumber { value: u64 }

From

Cover of Rust Essentials

Note

Should be #[derive(Clone, Copy)]? I got a compiler error when only use Copy.