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

Implements if_none and friends #875

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Implements if_none and friends #875

merged 2 commits into from
Dec 11, 2024

Conversation

zslayton
Copy link
Contributor

Implements:

  • if_none
  • if_some
  • if_single
  • if_multi
  • default (in terms of if_none)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@zslayton zslayton marked this pull request as ready for review December 10, 2024 16:49
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 85.32110% with 32 lines in your changes missing coverage. Please review.

Project coverage is 77.74%. Comparing base (8a0425f) to head (3a5183e).

Files with missing lines Patch % Lines
src/lazy/expanded/macro_evaluator.rs 85.38% 18 Missing and 7 partials ⚠️
src/lazy/expanded/e_expression.rs 0.00% 4 Missing ⚠️
src/lazy/expanded/compiler.rs 91.89% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #875      +/-   ##
==========================================
+ Coverage   77.68%   77.74%   +0.05%     
==========================================
  Files         136      136              
  Lines       34188    34392     +204     
  Branches    34188    34392     +204     
==========================================
+ Hits        26558    26737     +179     
- Misses       5648     5666      +18     
- Partials     1982     1989       +7     

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

src/lazy/expanded/macro_evaluator.rs Outdated Show resolved Hide resolved
Comment on lines +413 to 415
template(
"(macro default (expr* default_expr*) (.if_none (%expr) (%default_expr) (%expr) ))",
),
Copy link
Contributor

Choose a reason for hiding this comment

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

It's nice to see these things pay off.

Co-authored-by: Joshua Barr <70981087+jobarr-amzn@users.noreply.github.com>
@zslayton zslayton merged commit 3c76865 into main Dec 11, 2024
31 checks passed
@zslayton zslayton deleted the if-none branch December 11, 2024 12:44
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.

2 participants