all repos — searchix @ 131ccd3edc02facbceb27c4ac44451a45bbb384e

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix: error when exporting from storage to index

Alan Pearce
commit

131ccd3edc02facbceb27c4ac44451a45bbb384e

parent

35226fd9989a28f813380e665a026caf427cb549

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M internal/storage/store.gointernal/storage/store.go
@@ -181,7 +181,7 @@
return doc, nil } -func MakeSourceExporter( +func MakeSourceExporter[T nix.Importable]( store *Store, source *config.Source, ) func(context.Context) (<-chan nix.Importable, <-chan error) {
@@ -193,8 +193,8 @@ go func() {
defer close(results) defer close(errs) - var obj nix.Importable - objs := make([]nix.Importable, 0, BatchSize) + var obj T + objs := make([]T, 0, BatchSize) node := store.From(source.Key) count, err := node.Count(&obj) if err != nil {