Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor with #[derive(derive_more::From)] #281

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Sep 12, 2023

Description of Changes

Refactors some code with #[derive(derive_more::From)].

API and ABI

  • This is a breaking change to the module ABI
  • This is a breaking change to the module API
  • This is a breaking change to the ClientAPI
  • This is a breaking change to the SDK API

If the API is breaking, please state below what will break

Comment on lines +373 to 381
#[from]
Value(AlgebraicValue),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean From is only implemented for this variant and not the others?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, exactly; you can also use #[from(ignore)] when you want most variants save for one or so.

@Centril Centril force-pushed the centril/derive-more branch from a51c631 to 5127ec7 Compare September 13, 2023 11:22
@Centril Centril force-pushed the centril/derive-more branch from 5127ec7 to a3ad975 Compare September 13, 2023 11:22
@Centril Centril enabled auto-merge (squash) September 13, 2023 11:25
@Centril Centril merged commit 12a7e7f into master Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants