Remove moot conformance (#91)

This commit is contained in:
Sindre Sorhus 2022-01-25 15:08:01 +07:00 committed by GitHub
parent 64010fdcc2
commit 8c0d80e783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
// MIT License © Sindre Sorhus // MIT License © Sindre Sorhus
import Foundation import Foundation
public protocol DefaultsBaseKey: Defaults.AnyKey { public protocol DefaultsBaseKey {
var name: String { get } var name: String { get }
var suite: UserDefaults { get } var suite: UserDefaults { get }
} }
@ -17,7 +17,7 @@ extension DefaultsBaseKey {
public enum Defaults { public enum Defaults {
public typealias BaseKey = DefaultsBaseKey public typealias BaseKey = DefaultsBaseKey
public typealias AnyKey = Keys public typealias Keys = AnyKey
public typealias Serializable = DefaultsSerializable public typealias Serializable = DefaultsSerializable
public typealias CollectionSerializable = DefaultsCollectionSerializable public typealias CollectionSerializable = DefaultsCollectionSerializable
public typealias SetAlgebraSerializable = DefaultsSetAlgebraSerializable public typealias SetAlgebraSerializable = DefaultsSetAlgebraSerializable
@ -26,7 +26,8 @@ public enum Defaults {
public typealias Bridge = DefaultsBridge public typealias Bridge = DefaultsBridge
typealias CodableBridge = DefaultsCodableBridge typealias CodableBridge = DefaultsCodableBridge
public class Keys: BaseKey { // We cannot use `Key` as the container for keys because of "Static stored properties not supported in generic types".
public class AnyKey: BaseKey {
public typealias Key = Defaults.Key public typealias Key = Defaults.Key
public let name: String public let name: String