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

Replace panic with nil return in newInjectedCompositeFieldsHandler #2808

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

m-Peter
Copy link
Contributor

@m-Peter m-Peter commented Sep 22, 2023

Description

There is no reason to panic when the location of a common.CompositeKindContract is not a common.AddressLocation. We can simply return nil, as we already do for stdlib.CryptoCheckerLocation.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@m-Peter m-Peter force-pushed the injected-fields-handler-remove-panic branch from a1455a1 to 58bf115 Compare September 22, 2023 09:42
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (0639275) 79.23% compared to head (58bf115) 79.24%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2808   +/-   ##
=======================================
  Coverage   79.23%   79.24%           
=======================================
  Files         333      333           
  Lines       78753    78753           
=======================================
+ Hits        62401    62406    +5     
+ Misses      14042    14038    -4     
+ Partials     2310     2309    -1     
Flag Coverage Δ
unittests 79.24% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
runtime/environment.go 92.62% <100.00%> (+0.31%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Thanks!

@SupunS SupunS merged commit 1309c1d into onflow:master Sep 22, 2023
11 of 14 checks passed
@m-Peter m-Peter deleted the injected-fields-handler-remove-panic branch September 25, 2023 09:44
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.

3 participants