-
Notifications
You must be signed in to change notification settings - Fork 455
Migrate examples to new APIs #487
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
Conversation
This is an example of a code snippet which would get more complicated using the new Entry API: https://github.com/paritytech/ink/blob/d4df4e7ebadc449fc6d63cebb115d546d3b57ca5/examples/erc721/lib.rs#L266-L274. |
Codecov Report
@@ Coverage Diff @@
## master #487 +/- ##
===========================================
- Coverage 80.11% 66.03% -14.08%
===========================================
Files 142 142
Lines 6230 6230
===========================================
- Hits 4991 4114 -877
- Misses 1239 2116 +877
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all looks good but contains some non semantic preserving changes that should either be rewritten or removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #485
Left these two ToDos out:
There are no examples which could use
Vec::set()
orVec::clear()
at the moment.The method is
unsafe
and we try to use onlyunsafe
in examples when it's strictly necessary.In terms of the new HashMap Entry API there are more places where we could use them ‒ at the cost of readability though.