TPE: Use helper functions to build the return value#2301
TPE: Use helper functions to build the return value#2301john-h-kastner-aws merged 1 commit intocedar-policy:mainfrom
Conversation
Signed-off-by: Lucas Käldström <lucas.kaldstrom@upbound.io>
56a0f5a to
41ecf77
Compare
| value: principal.into(), | ||
| ty, | ||
| } | ||
| mk_concrete(principal.into()) |
There was a problem hiding this comment.
the VS Code diff is nicer in that it shows that principal.into() stayed intact here, but Github does not, even in hide whitespace mode
Coverage ReportHead Commit: Base Commit: Download the full coverage report. Coverage of Added or Modified Lines of Rust CodeRequired coverage: 80.00% Actual coverage: 79.61% Status: FAILED ❌ Details
Coverage of All Lines of Rust CodeRequired coverage: 80.00% Actual coverage: 87.60% Status: PASSED ✅ Details
|
|
You've obviously not written any new uncovered code here. But, if you're in the mood, I think some of the uncovered lines being reported should be easy enough to reach with a test case. (some others are type errors which we don't expect to be reachable) |
Yeah, I'll look at this in some of the coming PRs to see if I can make the coverage checker happier 😄 |
Description of changes
Broken out from #2162, prefactoring.
This PR makes it clear that the type information is not actually used to make any decisions (yet) during TPE (ref: #2092).
This should decrease a bit of the cognitive complexity when reading the source code too, hopefully.
In #2162, it will become convenient to add logic in these helper functions, e.g. preserving the
Locof the residual, or adding aLocto the error type.Issue #, if available
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):
cedar-policy-core,cedar-validator, etc.)I confirm that this PR (choose one, and delete the other options):
I confirm that
cedar-spec(choose one, and delete the other options):I confirm that
docs.cedarpolicy.com(choose one, and delete the other options):