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

Improve ContractEntry construction #26

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

Buckram123
Copy link
Collaborator

This PR implements FromStr for ContractEntry.

Checklist

  • CI is green.
  • Changelog updated.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 26, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0a98956
Status: ✅  Deploy successful!
Preview URL: https://7b7cf105.abstract-docs.pages.dev
Branch Preview URL: https://update-improve-contract-entr.abstract-docs.pages.dev

View logs

@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2023

Codecov Report

Merging #26 (7d97178) into main (17fbee7) will increase coverage by 0.00%.
The diff coverage is 71.42%.

@@           Coverage Diff           @@
##             main      #26   +/-   ##
=======================================
  Coverage   24.09%   24.10%           
=======================================
  Files         266      266           
  Lines       23369    23375    +6     
=======================================
+ Hits         5631     5634    +3     
- Misses      17738    17741    +3     
Files Changed Coverage Δ
.../abstract-core/src/objects/entry/contract_entry.rs 46.26% <66.66%> (+0.36%) ⬆️
modules/contracts/apps/croncat/src/utils.rs 96.42% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Buckram123 Buckram123 requested a review from adairrr July 26, 2023 17:59
Copy link
Contributor

@adairrr adairrr left a comment

Choose a reason for hiding this comment

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

Lgtm!

@Buckram123
Copy link
Collaborator Author

@adairrr wdyt, do we need to remove TryFrom for UncheckedEntry?

@Buckram123
Copy link
Collaborator Author

@adairrr wdyt, do we need to remove TryFrom for UncheckedEntry?

And if yes, how we can do it harmless

@adairrr
Copy link
Contributor

adairrr commented Jul 26, 2023

@adairrr wdyt, do we need to remove TryFrom for UncheckedEntry?

And if yes, how we can do it harmless

Is there a reason to?

@Buckram123
Copy link
Collaborator Author

Buckram123 commented Jul 26, 2023

@adairrr wdyt, do we need to remove TryFrom for UncheckedEntry?

And if yes, how we can do it harmless

Is there a reason to?

Sorry, meant to say remove TryFrom<String<(got trolled by markdown) in favor of TryFrom<&str> because references are always preferable, and we don't benefit from owning a string anyway. In addition can save few bytes in wasms

@Kayanski
Copy link
Contributor

Shouldn't we keep the From implementation ?

@Buckram123
Copy link
Collaborator Author

Shouldn't we keep the From implementation ?

Is there's a reason to support both string and string slice?

@Kayanski
Copy link
Contributor

Not really no

@CyberHoward
Copy link
Contributor

module tests failing, will check after merging this.

@CyberHoward CyberHoward merged commit a5eca9b into main Aug 17, 2023
@CyberHoward CyberHoward deleted the update/improve-contract_entry-construction branch August 17, 2023 07:27
Buckram123 pushed a commit that referenced this pull request Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants