-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/diff: clean up code a bit ahead of dropping deprecated APIs
The diff package uses the deprecated cue.Value.Struct API to deal with structs, and it's the only non-test piece of code we have which still does this. Ahead of doing that refactor, and to wrap my head around the code, do a few small simplifications and tweaks first: * xMap only needs to track the presence of fields by selector in x * yMap using int makes the code below more consistent * use tighter variable scopes where possible * slightly reduce verbosity elsewhere where it makes sense Signed-off-by: Daniel Martí <[email protected]> Change-Id: I95603e6760ebf6ea777434c2dcfd79f769fe34d4 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202084 Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information
Showing
1 changed file
with
17 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters