-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/filetypes: simplify some of the CUE logic
hasEncoding returned both whether the encoding field was concrete and whether the field had a concrete default value, when in fact only the latter was necessary - no tests change behavior with this change, even though a couple of unit tests did run into the edge case of hasEncoding returning (false, true). The change to have hasEncoding return two values is relatively recent, from https://cue-review.googlesource.com/c/cue/+/5410 in mid 2020, and it seems like none of the added test cases there needed the added logic to hasEncoding. While here, move "tags" back to the top-level scope. Just like the "interpretations" struct, it does not vary between modes. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I7d238617f249bced74d0e5ee640e92e86e5d4dda Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193575 Reviewed-by: Roger Peppe <rogpeppe@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
- Loading branch information
Showing
2 changed files
with
76 additions
and
80 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
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