From 9930412c6bab9b84e41df6893dc7436b43ca5cc2 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Wed, 16 Sep 2026 21:12:47 -0700 Subject: [PATCH] polish P1: drop CipherScheme's unused Codable and CaseIterable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nothing encodes a CipherScheme — Settings stores its rawValue through the accessor — and nothing enumerates the cases; the picker lists both by hand. String, Sendable and Hashable are the three that are actually load bearing (settings, ChannelConfig, SwiftUI's .tag). Co-Authored-By: Claude Opus 5 (1M context) --- Sources/MWBCore/CipherStream.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/MWBCore/CipherStream.swift b/Sources/MWBCore/CipherStream.swift index c5bf9e3..0a26cdd 100644 --- a/Sources/MWBCore/CipherStream.swift +++ b/Sources/MWBCore/CipherStream.swift @@ -33,7 +33,7 @@ public enum CipherError: Error, Sendable, Hashable { /// /// There is no negotiation: both vintages of Windows write their preamble /// first and never adapt, so the user picks the one their PCs run. -public enum CipherScheme: String, Sendable, Hashable, CaseIterable, Codable { +public enum CipherScheme: String, Sendable, Hashable { /// PowerToys v0.100.2 and earlier: fixed salt and IV, no cleartext header. case legacy /// PowerToys v0.101 and later: a per-connection random salt and IV sent in