Fixes BIOSError compilation error when compiling with Xcode 13

Xcode 12 and older incorrectly let us declare BIOSError.incorrectSize as @available(iOS 13), but Swift doesn't support @available for enum cases with associated values. Xcode 13 now properly enforces this restriction, so we instead mark the enum itself as @available(iOS 13).
This commit is contained in:
Riley Testut 2021-08-09 16:54:53 -07:00
parent 394030ad43
commit fd0427d2ad

View File

@ -28,13 +28,12 @@ private extension MelonDSCoreSettingsViewController
case changeCore
}
@available(iOS 13, *)
enum BIOSError: LocalizedError
{
case unknownSize(URL)
case incorrectHash(URL, hash: String, expectedHash: String)
case unsupportedHash(URL, hash: String)
@available(iOS 13, *)
case incorrectSize(URL, size: Int, validSizes: Set<ClosedRange<Measurement<UnitInformationStorage>>>)
private static let byteFormatter: ByteCountFormatter = {