From 37470915f5fcbb5ddd3c0404774dfe66a7db8904 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Wed, 18 Jan 2023 21:23:16 +0200 Subject: [PATCH] Fix warnings in benchmarks warning: tuple conversion from '(offset: Int, element: S.Element)' to '(index: Int, elem: S.Element)' mismatches labels --- benchmark/single-source/LuhnAlgoEager.swift | 8 ++++---- benchmark/single-source/LuhnAlgoLazy.swift | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/benchmark/single-source/LuhnAlgoEager.swift b/benchmark/single-source/LuhnAlgoEager.swift index 34ac7aacd0a..3a038fbd5ba 100644 --- a/benchmark/single-source/LuhnAlgoEager.swift +++ b/benchmark/single-source/LuhnAlgoEager.swift @@ -206,10 +206,10 @@ func mapEveryN( ) -> [S.Element] { let isNth = isMultipleOf(n) return source.enumerated().map { - (pair: (index: Int, elem: S.Element)) in - isNth(pair.index+1) - ? transform(pair.elem) - : pair.elem + (pair: (offset: Int, element: S.Element)) in + isNth(pair.offset+1) + ? transform(pair.element) + : pair.element } } diff --git a/benchmark/single-source/LuhnAlgoLazy.swift b/benchmark/single-source/LuhnAlgoLazy.swift index 087d1176b8f..6ee5dc7d0c4 100644 --- a/benchmark/single-source/LuhnAlgoLazy.swift +++ b/benchmark/single-source/LuhnAlgoLazy.swift @@ -206,10 +206,10 @@ func mapEveryN( ) -> [S.Element] { let isNth = isMultipleOf(n) return source.enumerated().map { - (pair: (index: Int, elem: S.Element)) in - isNth(pair.index+1) - ? transform(pair.elem) - : pair.elem + (pair: (offset: Int, element: S.Element)) in + isNth(pair.offset+1) + ? transform(pair.element) + : pair.element } }