]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Rename constant to satisfy SwiftLint
authorAlessio Nossa <alessio.nossa@gmail.com>
Tue, 27 Feb 2024 23:19:52 +0000 (00:19 +0100)
committerAlessio Nossa <alessio.nossa@gmail.com>
Tue, 27 Feb 2024 23:36:18 +0000 (00:36 +0100)
Signed-off-by: Alessio Nossa <alessio.nossa@gmail.com>
Sources/WireguardAppIntents/BuildPeerConfigurationUpdate.swift

index 090e52a5aa89b7d0cc0890acbc026e4b7a077567..d5f8cbfddb72b5fa36b10c26e95c34b51a491889 100644 (file)
@@ -3,8 +3,6 @@
 
 import AppIntents
 
-let kEndpointConfigurationUpdateDictionaryKey = "Endpoint"
-
 @available(iOS 16.0, macOS 13.0, watchOS 9.0, tvOS 16.0, *)
 struct BuildPeerConfigurationUpdate: AppIntent {
 
@@ -40,6 +38,8 @@ struct BuildPeerConfigurationUpdate: AppIntent {
 
 @available(iOS 16.0, macOS 13.0, watchOS 9.0, tvOS 16.0, *)
 struct AppIntentsPeer: TransientAppEntity {
+    
+    static let kEndpointConfigUpdateDictionaryKey = "Endpoint"
 
     static var typeDisplayRepresentation = TypeDisplayRepresentation(
         name: LocalizedStringResource("peerConfigurationUpdateEntityName", table: "AppIntents")
@@ -60,7 +60,7 @@ struct AppIntentsPeer: TransientAppEntity {
         dictionary[publicKey] = [:]
 
         if let endpoint {
-            dictionary[publicKey]?.updateValue(endpoint, forKey: kEndpointConfigurationUpdateDictionaryKey)
+            dictionary[publicKey]?.updateValue(endpoint, forKey: Self.kEndpointConfigUpdateDictionaryKey)
         }
 
         let jsonData: Data