stellar / rs-soroban-sdk

Rust SDK for Soroban contracts.
Apache License 2.0
128 stars 67 forks source link

Revert "Check UDT enum integer must derive from `Copy` (#1264)" #1283

Closed jayz22 closed 5 months ago

jayz22 commented 5 months ago

What

This reverts commit e43b3dbc463d510cf708b9e72a87794f348170c6.

Why

It only works if the derive attribute comes after the contracttype and is contained in a single list. i.e. below works

#[contracttype]
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub enum MyType

but these two don't

#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[contracttype]
pub enum MyType
#[contracttype]
#[derive(Clone, Copy)]
#[derive(PartialEq, Eq, Debug)]
pub enum MyType

Known limitations

[TODO or N/A]