Newtype (usize) efficacy and idiomatic usage

I have a newtype

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Hash)]
// Type wrapper for Author IDs
pub struct AuthorId(usize);

It works. Using it produces good results. Fixing various compiler errros (very clear messages from the compiler), I wondered about one aspect.
In a lot of places, when I have an aid of type AuthorId, and am passing it around, I need to ssay aid.clone() to tell the compiler I want a copy of the value.
As I understand it, if I were just using a usize, the compiler would do this automatically.
I think I could get the compiler to do this automatically for AuthorId by deriving Copy for it?
If so, is that a good idea, or is it more maintainable to have the explicit clone() calls?
Thanks,
Joel

In this case, because the contents are Copy, there is no drawback to deriving Copy for the newtype and this is standard practice.

The only reasons to refrain from derive(Copy) or impl Copy for AuthorId, would be if one of these special cases applied:

  • You expect that in the future, AuthorId will be unable to implement Copy (e.g. due to containing a string). Then, using Copy now would be something you have to take out later.
  • The number of copies is meaningful and you want to make it explicit when a copy is made, or take an action then.

But neither of those are plausible for an ID number type, so do it.

Thanks for the quick replies. I will switch to using Copy.