dfinity / candid

Candid Library for the Internet Computer
Apache License 2.0
280 stars 81 forks source link

feat: make error clonable #554

Open nathanosdev opened 5 months ago

nathanosdev commented 5 months ago

Overview This makes candid::Error clonable, which makes it easier for downstream clients to also make their Error types cloneable.

I've made a related PR for agent-rs.

Considered Solutions I can also work around by using Arc<T> in downstream clients.

Considerations This shouldn't have any impact on security or performance. Anyone that was interacting directly with the Custom variant may have a breaking change since it is wrapped in an Arc<T> now.

nathanosdev commented 5 months ago

I agree that making a major bump just for this feature is not worth the effort, so I'm fine with leaving this to sleep and in the meantime I will just to_string() downstream.