Skip to content

refactor: use maps.Copy for cleaner map handling#6373

Merged
gmalouf merged 1 commit intoalgorand:masterfrom
sellskin:master
Jul 18, 2025
Merged

refactor: use maps.Copy for cleaner map handling#6373
gmalouf merged 1 commit intoalgorand:masterfrom
sellskin:master

Conversation

@sellskin
Copy link
Copy Markdown
Contributor

@sellskin sellskin commented Jul 1, 2025

Summary

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.

Test Plan

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jul 1, 2025

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 1, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 50.60%. Comparing base (9adaf55) to head (d69b8f3).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
cmd/algofix/typecheck.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6373      +/-   ##
==========================================
+ Coverage   49.81%   50.60%   +0.78%     
==========================================
  Files         356      653     +297     
  Lines       64417   110782   +46365     
==========================================
+ Hits        32091    56060   +23969     
- Misses      30970    51862   +20892     
- Partials     1356     2860    +1504     

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

Copy link
Copy Markdown
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

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

Isn't maps.Clone() better here, to do the allocation too?

Signed-off-by: sellskin <mydesk@yeah.net>
@sellskin
Copy link
Copy Markdown
Contributor Author

sellskin commented Jul 3, 2025

Isn't maps.Clone() better here, to do the allocation too?

maps.Clone is indeed a more suitable approach. I've made the change. Thanks for pointing this out.

@gmalouf gmalouf closed this Jul 18, 2025
@gmalouf gmalouf reopened this Jul 18, 2025
@gmalouf gmalouf requested a review from jannotti July 18, 2025 14:47
@gmalouf gmalouf merged commit de015d3 into algorand:master Jul 18, 2025
84 of 93 checks passed
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.

4 participants