Skip to content

Commit e68bd63

Browse files
mxeymvdan
authored andcommitted
cue/errors: make wrapped.Path faster by bypassing unnecessary reflection
This makes one of our cue cmd runs noticeably faster, from ~52s to ~36s. Change-Id: I735875bfcd8b08f329a59a903d4c7c1ae195f269 Signed-off-by: Maximilian Gaß <[email protected]> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198494 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
1 parent 055405a commit e68bd63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cue/errors/errors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (e *wrapped) Msg() (format string, args []interface{}) {
223223
}
224224

225225
func (e *wrapped) Path() []string {
226-
if p := Path(e.main); p != nil {
226+
if p := e.main.Path(); p != nil {
227227
return p
228228
}
229229
return Path(e.wrap)

0 commit comments

Comments
 (0)