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

Implement Mapping::get_or_use #2413

Merged
merged 11 commits into from
Jun 13, 2023
Merged

Implement Mapping::get_or_use #2413

merged 11 commits into from
Jun 13, 2023

Conversation

collinc97
Copy link
Collaborator

Overview

let current_amount: u64 = Mapping::get_or_use(account, receiver, 0u64);

Closed Issues

Closes #2412

@collinc97 collinc97 requested a review from d0cd June 12, 2023 22:13
@collinc97 collinc97 marked this pull request as ready for review June 12, 2023 23:05
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #2413 (1fc1cc1) into testnet3 (bb73b9f) will increase coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           testnet3    #2413      +/-   ##
============================================
+ Coverage     78.59%   78.61%   +0.02%     
============================================
  Files           154      154              
  Lines          4709     4710       +1     
  Branches       4708     4709       +1     
============================================
+ Hits           3701     3703       +2     
+ Misses         1008     1007       -1     
Impacted Files Coverage Δ
compiler/ast/src/functions/core_function.rs 100.00% <ø> (ø)
compiler/ast/src/lib.rs 79.48% <ø> (ø)
compiler/parser/src/parser/expression.rs 83.77% <ø> (ø)
compiler/parser/src/parser/statement.rs 83.50% <ø> (ø)
...er/passes/src/code_generation/visit_expressions.rs 82.25% <ø> (ø)
.../src/dead_code_elimination/eliminate_expression.rs 71.42% <ø> (ø)
compiler/passes/src/type_checking/checker.rs 95.83% <ø> (ø)
compiler/span/src/symbol.rs 84.61% <ø> (ø)

... and 5 files with indirect coverage changes

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

Copy link
Collaborator

@d0cd d0cd left a comment

Choose a reason for hiding this comment

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

PR looks good!
Left some minor points to address.

compiler/parser/src/parser/expression.rs Outdated Show resolved Hide resolved
program.json Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should delete this file

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should delete this file

collinc97 and others added 3 commits June 12, 2023 17:32
Co-authored-by: d0cd <pranavsaig@gmail.com>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Copy link
Collaborator

@d0cd d0cd left a comment

Choose a reason for hiding this comment

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

LGTM!

@collinc97 collinc97 merged commit d83c4be into testnet3 Jun 13, 2023
@collinc97 collinc97 deleted the update/get-or-use branch June 13, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor] Remove get_or_init introduce get_or_use
2 participants