all: various very small cleanups from gopls and staticcheck
I had been accumulating tiny tweaks and cleanups that were too small
to require a commit or review of their own.
* doTasks has had an unused parameter for a long time.
* publishRegistryResolverShim has an unused field.
* writeIndex did not actually check an error from os.WriteFile.
* extractFeatures can prepare the right slice capacities ahead of time.
* A few places can avoid the type parameter in generic func calls;
note that type inference got much better with Go 1.21.
* zeroReader.Read can make use of the new clear builtin in Go 1.21
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I4206073007191c28782acebe926c00ce3c3498db
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194842
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>