Bugfix ink_metadata: RootLayout must work for PortableForm #1989
Merged
xermicus merged 6 commits intouse-ink:masterfrom Nov 13, 2023
Merged
Bugfix ink_metadata: RootLayout must work for PortableForm #1989xermicus merged 6 commits intouse-ink:masterfrom
ink_metadata: RootLayout must work for PortableForm #1989xermicus merged 6 commits intouse-ink:masterfrom
Conversation
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑These are the results when building the
Link to the run | Last update: Mon Nov 13 19:59:15 CET 2023 |
ascjones
reviewed
Nov 13, 2023
crates/storage/src/lazy/mapping.rs
Outdated
| { | ||
| fn layout(_: &Key) -> Layout { | ||
| Layout::Root(RootLayout::new::<Self, _>( | ||
| Layout::Root(RootLayout::new::<_>( |
Collaborator
There was a problem hiding this comment.
Suggested change
| Layout::Root(RootLayout::new::<_>( | |
| Layout::Root(RootLayout::new( |
I believe for a single inferred generic parameter you just omit the <_>. Also in other places.
Contributor
Author
There was a problem hiding this comment.
lol yeah certainly, thanks!
ascjones
approved these changes
Nov 13, 2023
Collaborator
ascjones
left a comment
There was a problem hiding this comment.
Apart from the nit, LGTM
Signed-off-by: Cyrill Leutwiler <[email protected]>
Signed-off-by: Cyrill Leutwiler <[email protected]>
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
#1784 changed
RootLayout::new()to no longer be generic. Which breaks re-using the metadata for project relying on working withPortableFormexclusively (such as Solang).This should go into the next release or it will stuck Solang to an older version of
ink_metadata.Description
Changed the
RootLayout::new()function to be generic again. I think theTypecrafted inside the constructor is pure convenience that can be done by the caller anyways. However this cosmetic trade-off makesRootLayoutusable in purely portable contexts again.Also added a test that would break without the bugfix.
Checklist before requesting a review
CHANGELOG.md