Open jonjove opened 2 years ago
Not really, there are just some places where a clone was made but you could have just moved. For example, https://github.com/stellar/soroban-token-contract/blob/44127bca3ee1dcf3d8107db6fa60077e7ec3dff8/src/metadata.rs#L14-L17
I've also wondered about making everything Copy
, and think it could have benefits. There might also be disadvantages though.
I've also wondered about making everything Copy, and think it could have benefits.
Unfortunately plenty of SDK types, the ones that embed Env
, cannot be Copy
because the Env
contains an Rc<>
. It would be nice if we could make some of the types Copy
, especially types like BigInt
.
This is already done in the built-in token contract but is not done in the example token contract.
Is this related to SDK types not being Copy? I'm starting to think we should consider making all the SDK types Copy, given that the SDK types are mostly backed by a u64. Unsure if that has drawbacks though. cc @graydon