Skip to content

Conversation

@ilchu
Copy link
Contributor

@ilchu ilchu commented May 15, 2022

Signed-off-by: Ilia Churin [email protected]

Description of the Change

Added a crate with a proc macro to data_model that allows automatically deriving FromStr impls for any enums exhaustively.

Issue

Resolves #2056.

Benefits

FromStr derived automatically for all variants instead of having to list them manually as was done with a declarative macro.

Possible Drawbacks

Doubtful if this new dependency should be placed into data_model or in the macro crate and then re-exported. Opted for the former.

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label May 15, 2022
@ilchu ilchu force-pushed the from-str-proc-macro branch 3 times, most recently from 7b7ef44 to e65dc29 Compare May 16, 2022 08:53
@codecov
Copy link

codecov bot commented May 16, 2022

Codecov Report

Merging #2213 (87f4395) into iroha2-dev (d00e0a9) will not change coverage.
The diff coverage is n/a.

❗ Current head 87f4395 differs from pull request most recent head cc6242a. Consider uploading reports for the commit cc6242a to get more accurate results

@@        Coverage Diff         @@
##   iroha2-dev   #2213   +/-   ##
==================================
==================================

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d00e0a9...cc6242a. Read the comment docs.

@ilchu ilchu force-pushed the from-str-proc-macro branch 2 times, most recently from a91ff6e to 87f4395 Compare May 16, 2022 10:09
@ilchu ilchu force-pushed the from-str-proc-macro branch from 87f4395 to cc6242a Compare May 16, 2022 10:38
Copy link
Contributor

@appetrosyan appetrosyan left a comment

Choose a reason for hiding this comment

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

I'm happy we didn't need to add a custom implementation. Good job!

@appetrosyan appetrosyan self-assigned this May 17, 2022
@s8sato s8sato self-assigned this May 17, 2022
@ilchu ilchu merged commit 1144ccf into hyperledger-iroha:iroha2-dev May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iroha2-dev The re-implementation of a BFT hyperledger in RUST

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants