diff --git a/Sources/XMLCoder/Auxiliaries/XMLElement.swift b/Sources/XMLCoder/Auxiliaries/XMLElement.swift index fec84ec2..30e82fb5 100644 --- a/Sources/XMLCoder/Auxiliaries/XMLElement.swift +++ b/Sources/XMLCoder/Auxiliaries/XMLElement.swift @@ -182,21 +182,17 @@ struct _XMLElement { } fileprivate func formatXMLAttributes(_ formatting: XMLEncoder.OutputFormatting, _ string: inout String) { - if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { - if formatting.contains(.sortedKeys) { - formatSortedXMLAttributes(&string) - return - } + if formatting.contains(.sortedKeys) { + formatSortedXMLAttributes(&string) + return } formatUnsortedXMLAttributes(&string) } fileprivate func formatXMLElements(_ formatting: XMLEncoder.OutputFormatting, _ string: inout String, _ level: Int, _ cdata: Bool, _ prettyPrinted: Bool) { - if #available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { - if formatting.contains(.sortedKeys) { - formatSortedXMLElements(&string, level, cdata, formatting, prettyPrinted) - return - } + if formatting.contains(.sortedKeys) { + formatSortedXMLElements(&string, level, cdata, formatting, prettyPrinted) + return } formatUnsortedXMLElements(&string, level, cdata, formatting, prettyPrinted) } diff --git a/Sources/XMLCoder/Encoder/XMLEncoder.swift b/Sources/XMLCoder/Encoder/XMLEncoder.swift index c575d25c..211acb3a 100644 --- a/Sources/XMLCoder/Encoder/XMLEncoder.swift +++ b/Sources/XMLCoder/Encoder/XMLEncoder.swift @@ -30,7 +30,6 @@ open class XMLEncoder { public static let prettyPrinted = OutputFormatting(rawValue: 1 << 0) /// Produce XML with keys sorted in lexicographic order. - @available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) public static let sortedKeys = OutputFormatting(rawValue: 1 << 1) }