Skip to content

Commit 6e5d962

Browse files
authored
Remove Collections+DataProtocol and some CocoaError extensions (#4956)
1 parent d8f1bfe commit 6e5d962

File tree

2 files changed

+0
-120
lines changed

2 files changed

+0
-120
lines changed

Sources/Foundation/Collections+DataProtocol.swift

Lines changed: 0 additions & 61 deletions
This file was deleted.

Sources/Foundation/NSError.swift

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -681,41 +681,6 @@ public extension CocoaError {
681681
}
682682

683683
extension CocoaError {
684-
public static var fileNoSuchFile: CocoaError.Code { return .fileNoSuchFile }
685-
public static var fileLocking: CocoaError.Code { return .fileLocking }
686-
public static var fileReadUnknown: CocoaError.Code { return .fileReadUnknown }
687-
public static var fileReadNoPermission: CocoaError.Code { return .fileReadNoPermission }
688-
public static var fileReadInvalidFileName: CocoaError.Code { return .fileReadInvalidFileName }
689-
public static var fileReadCorruptFile: CocoaError.Code { return .fileReadCorruptFile }
690-
public static var fileReadNoSuchFile: CocoaError.Code { return .fileReadNoSuchFile }
691-
public static var fileReadInapplicableStringEncoding: CocoaError.Code { return .fileReadInapplicableStringEncoding }
692-
public static var fileReadUnsupportedScheme: CocoaError.Code { return .fileReadUnsupportedScheme }
693-
public static var fileReadTooLarge: CocoaError.Code { return .fileReadTooLarge }
694-
public static var fileReadUnknownStringEncoding: CocoaError.Code { return .fileReadUnknownStringEncoding }
695-
public static var fileWriteUnknown: CocoaError.Code { return .fileWriteUnknown }
696-
public static var fileWriteNoPermission: CocoaError.Code { return .fileWriteNoPermission }
697-
public static var fileWriteInvalidFileName: CocoaError.Code { return .fileWriteInvalidFileName }
698-
public static var fileWriteFileExists: CocoaError.Code { return .fileWriteFileExists }
699-
public static var fileWriteInapplicableStringEncoding: CocoaError.Code { return .fileWriteInapplicableStringEncoding }
700-
public static var fileWriteUnsupportedScheme: CocoaError.Code { return .fileWriteUnsupportedScheme }
701-
public static var fileWriteOutOfSpace: CocoaError.Code { return .fileWriteOutOfSpace }
702-
public static var fileWriteVolumeReadOnly: CocoaError.Code { return .fileWriteVolumeReadOnly }
703-
public static var fileManagerUnmountUnknown: CocoaError.Code { return .fileManagerUnmountUnknown }
704-
public static var fileManagerUnmountBusy: CocoaError.Code { return .fileManagerUnmountBusy }
705-
public static var keyValueValidation: CocoaError.Code { return .keyValueValidation }
706-
public static var formatting: CocoaError.Code { return .formatting }
707-
public static var userCancelled: CocoaError.Code { return .userCancelled }
708-
public static var featureUnsupported: CocoaError.Code { return .featureUnsupported }
709-
public static var executableNotLoadable: CocoaError.Code { return .executableNotLoadable }
710-
public static var executableArchitectureMismatch: CocoaError.Code { return .executableArchitectureMismatch }
711-
public static var executableRuntimeMismatch: CocoaError.Code { return .executableRuntimeMismatch }
712-
public static var executableLoad: CocoaError.Code { return .executableLoad }
713-
public static var executableLink: CocoaError.Code { return .executableLink }
714-
public static var propertyListReadCorrupt: CocoaError.Code { return .propertyListReadCorrupt }
715-
public static var propertyListReadUnknownVersion: CocoaError.Code { return .propertyListReadUnknownVersion }
716-
public static var propertyListReadStream: CocoaError.Code { return .propertyListReadStream }
717-
public static var propertyListWriteStream: CocoaError.Code { return .propertyListWriteStream }
718-
public static var propertyListWriteInvalid: CocoaError.Code { return .propertyListWriteInvalid }
719684
public static var xpcConnectionInterrupted: CocoaError.Code { return .xpcConnectionInterrupted }
720685
public static var xpcConnectionInvalid: CocoaError.Code { return .xpcConnectionInvalid }
721686
public static var xpcConnectionReplyInvalid: CocoaError.Code { return .xpcConnectionReplyInvalid }
@@ -732,26 +697,6 @@ extension CocoaError {
732697
}
733698

734699
extension CocoaError {
735-
public var isCoderError: Bool {
736-
return code.rawValue >= 4864 && code.rawValue <= 4991
737-
}
738-
739-
public var isExecutableError: Bool {
740-
return code.rawValue >= 3584 && code.rawValue <= 3839
741-
}
742-
743-
public var isFileError: Bool {
744-
return code.rawValue >= 0 && code.rawValue <= 1023
745-
}
746-
747-
public var isFormattingError: Bool {
748-
return code.rawValue >= 2048 && code.rawValue <= 2559
749-
}
750-
751-
public var isPropertyListError: Bool {
752-
return code.rawValue >= 3840 && code.rawValue <= 4095
753-
}
754-
755700
public var isUbiquitousFileError: Bool {
756701
return code.rawValue >= 4352 && code.rawValue <= 4607
757702
}
@@ -760,10 +705,6 @@ extension CocoaError {
760705
return code.rawValue >= 4608 && code.rawValue <= 4863
761706
}
762707

763-
public var isValidationError: Bool {
764-
return code.rawValue >= 1024 && code.rawValue <= 2047
765-
}
766-
767708
public var isXPCConnectionError: Bool {
768709
return code.rawValue >= 4096 && code.rawValue <= 4224
769710
}

0 commit comments

Comments
 (0)