search: make ParallelJob a pointer type
Created by: rvantonder
Stacked on https://github.com/sourcegraph/sourcegraph/pull/31135.
Camden indulged my suggestion in a previous PR where I suggested changing
type ParallelJob struct {
children []Job
}
to
type ParallelJob []Job
I can't find the comment but I think it was in https://github.com/sourcegraph/sourcegraph/pull/30063. This created a foot gun when I was writing a pretty printer, because the type switch:
case *ParallelJob
should have been
case ParallelJob
Since the compiler can't type check exhaustiveness this type checked but silently didn't work. So because of this I'm making this a pointer type so that there's less foot gun potential (and I probably won't suggest anything like I did before going forward).
Test plan
Semantics-preserving type change.