From fadb26de64d749e30cb2ac627e2218033a222a70 Mon Sep 17 00:00:00 2001 From: taylorswift Date: Sun, 7 Jul 2024 20:24:58 +0000 Subject: [PATCH] temporarily workaround https://github.com/swiftlang/swift/issues/73207 --- Sources/LZ77/HuffmanCoding/LZ77.HuffmanTree.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/LZ77/HuffmanCoding/LZ77.HuffmanTree.swift b/Sources/LZ77/HuffmanCoding/LZ77.HuffmanTree.swift index 651c93e7..8bac362a 100644 --- a/Sources/LZ77/HuffmanCoding/LZ77.HuffmanTree.swift +++ b/Sources/LZ77/HuffmanCoding/LZ77.HuffmanTree.swift @@ -92,7 +92,7 @@ extension LZ77.HuffmanTree where Symbol:BinaryInteger let n:Int = 256 - interior var z:Int = 256 // n // finish validating the tree - for (i, leaves):(Int, Range) in levels[8 ..< 15].enumerated() + for (i, leaves):(offset:Int, element:Range) in levels[8 ..< 15].enumerated() { z += leaves.count << (6 - i) interior = 2 * interior - leaves.count @@ -147,7 +147,7 @@ extension LZ77.HuffmanTree where Symbol:BinaryInteger let ranges:[Range] = .init(unsafeUninitializedCapacity: 15) { var base:Int = 0 - for (i, count):(Int, Int) in counts.dropFirst().enumerated() + for (i, count):(offset:Int, element:Int) in counts.dropFirst().enumerated() { $0[i] = base ..< base + count base += count