From 1531fee47250d622b4534750aca866fba3fab8d4 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Wed, 14 Feb 2024 18:23:43 +0100 Subject: [PATCH] clarify comment --- internal/command/jsonformat/collections/slice.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/command/jsonformat/collections/slice.go b/internal/command/jsonformat/collections/slice.go index c6dd335f07..69dcba6332 100644 --- a/internal/command/jsonformat/collections/slice.go +++ b/internal/command/jsonformat/collections/slice.go @@ -35,9 +35,8 @@ func TransformSlice[Input any](before, after []Input, process TransformIndices, } func ProcessSlice[Input any](before, after []Input, process ProcessIndices, isObjType IsObjType[Input]) { - // If before and after are the same length we want to compare elements - // on an individual basis - + // If before and after are the same length and is not a reordering + // we want to compare elements on an individual basis if len(before) == len(after) && !isReorder(before, after) { for ix := range before { process(ix, ix)