From 02d3d24bc52ca3e1de591977613a37684c6fd7d4 Mon Sep 17 00:00:00 2001 From: Seebs Date: Mon, 27 Sep 2021 11:58:30 -0500 Subject: [PATCH] code review cleanup --- cluster.go | 3 +-- encoding/proto/proto.go | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cluster.go b/cluster.go index 29c4c2164..2843b732f 100644 --- a/cluster.go +++ b/cluster.go @@ -1567,8 +1567,7 @@ func (c *cluster) translateIndexKeys(ctx context.Context, indexName string, keys return ids, nil } -// This implements ingest's key translator interface on a cluster/index -// pair. +// This implements ingest's key translator interface on a cluster/index pair. type clusterKeyTranslator struct { ctx context.Context // we're created within a request context and need to pass that to cluster ops c *cluster diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index 9a8a262a0..c5672e563 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -958,9 +958,6 @@ func (s Serializer) encodeShardedIngestRequest(req *ingest.ShardedRequest) *pb.S func (s Serializer) encodeShardIngestOperations(ops []*ingest.Operation) *pb.ShardIngestOperations { out := &pb.ShardIngestOperations{} - if len(ops) == 0 { - return out - } for _, op := range ops { if op == nil { continue