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

Adjust repo to scale-info pub interface #16

Merged
merged 1 commit into from
May 16, 2023
Merged

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented May 16, 2023

This PR makes the transition from utilizing scale-info getter methods to using
the structure fields directly. The former method has been deprecated recently,
causing the clippy step to fail due to excessive warnings.

// @paritytech/subxt-team

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv self-assigned this May 16, 2023
Copy link
Member

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

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

I liked the "getter methods better" but all good from my side

@@ -80,7 +80,7 @@ impl<'scale, 'info> Composite<'scale, 'info> {
/// Return the name of the next field to be decoded; `None` if either the field has no name,
/// or there are no fields remaining.
pub fn peek_name(&self) -> Option<&'info str> {
self.fields.get(0).and_then(|f| f.name().map(|n| &**n))
self.fields.get(0).and_then(|f| f.name.as_deref())
Copy link
Member

@niklasad1 niklasad1 May 16, 2023

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

Awesome!

@lexnv lexnv merged commit 81f5343 into main May 16, 2023
@lexnv lexnv deleted the lexnv/adjust_scale_info branch May 16, 2023 10:33
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.

3 participants