-
Notifications
You must be signed in to change notification settings - Fork 276
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] #4259: Make Action and Filter non-generic types #4375
Merged
mversic
merged 2 commits into
hyperledger-iroha:iroha2-dev
from
DCNick3:non-generic-action
Mar 19, 2024
Merged
[refactor] #4259: Make Action and Filter non-generic types #4375
mversic
merged 2 commits into
hyperledger-iroha:iroha2-dev
from
DCNick3:non-generic-action
Mar 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DCNick3
requested review from
s8sato,
mversic,
Arjentix,
SamHSmith,
outoftardis,
Erigara,
0x009922,
VAmuzing and
Asem-Abdelhady
as code owners
March 19, 2024 10:18
github-actions
bot
added
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
api-changes
Changes in the API for client libraries
labels
Mar 19, 2024
DCNick3
changed the title
Make Action and Filter non-generic types
[refactor] #4259: Make Action and Filter non-generic types
Mar 19, 2024
Erigara
reviewed
Mar 19, 2024
DCNick3
force-pushed
the
non-generic-action
branch
2 times, most recently
from
March 19, 2024 11:52
f7bb96f
to
c573b05
Compare
Erigara
previously approved these changes
Mar 19, 2024
… types They were previously generic over the event filter type, but this was used only in iroha_core. Instead generic copies of these types are put into core, ultimetely simplifying the public API. Signed-off-by: Nikita Strygin <[email protected]>
…`Action`s Make Action's constructor accept `impl Into<TriggeringEventFilterBox>`. Add shorthand conversions from concrete data event filter types into the top-level boxes Signed-off-by: Nikita Strygin <[email protected]>
DCNick3
force-pushed
the
non-generic-action
branch
from
March 19, 2024 13:43
c573b05
to
efde376
Compare
mversic
reviewed
Mar 19, 2024
mversic
approved these changes
Mar 19, 2024
Erigara
approved these changes
Mar 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api-changes
Changes in the API for client libraries
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
Refactor
Improvement to overall code quality
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Make the
Action
andFilter
types exported fromiroha_data_model
non-generic. This is used by code iniroha_core
, so make generic copies in there. There's no need to complicate the public API due to the requirements of the implementation.This also makes the
Action
constructor acceptimpl Into<TriggeringEventFilterBox>
as a filter, simplifying most API invocations. Additional shorthand conversions from concrete event filter types are added (for exampleAccountEventFilter -> TriggeringEventFilterBox
) to reduce the required boilerplate even more.Linked issue
Closes #4259
Benefits
No unnecessary generic in the API -> better code completion and easier API.
Checklist