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

Make StateMetadataDocument public #1085

Merged
merged 2 commits into from
Nov 21, 2022
Merged

Conversation

PhilippGackstatter
Copy link
Contributor

Description of change

We currently get warnings that StateMetadataDocument::{into_iota_document,unpack} are unused when running cargo check --no-default-features.

This PR makes StateMetadata public to get rid of those warnings. Another approach would have been to feature-gate everything state metadata related behind the client feature. The reasoning for making it public is that StateMetadata can be used with clients other than iota-client and there's no inherent reason why it has to be tied to that specific client. We may also want to use it from the Wasm bindings without adding a dependency to iota-client in order to decode the state metadata of an Alias Output resolved by, say, iota.js.

Eq was also derived for StateMetadataDocument to satisfy a clippy lint.

Links to any relevant issues

n/a

Type of change

Add an x to the boxes that are relevant to your changes.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

None.

Change checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@PhilippGackstatter PhilippGackstatter added Added A new feature that requires a minor release. Part of "Added" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Nov 18, 2022
@PhilippGackstatter PhilippGackstatter added this to the v0.7 Features milestone Nov 18, 2022
Copy link
Contributor

@olivereanderson olivereanderson left a comment

Choose a reason for hiding this comment

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

LGTM.

Remember to address my comments after #1086 has been merged.

@PhilippGackstatter PhilippGackstatter merged commit 00c04a4 into main Nov 21, 2022
@PhilippGackstatter PhilippGackstatter deleted the chore/public-state-metadata branch November 21, 2022 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added A new feature that requires a minor release. Part of "Added" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants