all repos — searchix @ 7b5fc09fce4a41c2899a7157843b5d3106749b8b

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

refactor: improve type hinting of setField
Alan Pearce alan@alanpearce.eu
Mon, 30 Dec 2024 19:03:15 +0100
commit

7b5fc09fce4a41c2899a7157843b5d3106749b8b

parent

8fcf4cf54ec26ce77a95e7c05a1183543fa4c105

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

jump to
M internal/index/search.gointernal/index/search.go
@@ -85,10 +85,10 @@ 	return result, nil
 }
 
-func setField(
-	q query.FieldableQuery,
+func setField[T query.FieldableQuery](
+	q T,
 	field string,
-) query.FieldableQuery {
+) T {
 	q.SetField(field)
 
 	return q