We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e954b90 commit d70383eCopy full SHA for d70383e
Foundation/XMLDocument.swift
@@ -99,7 +99,7 @@ open class XMLDocument : XMLNode {
99
@abstract Returns a document created from data. Parse errors are returned in <tt>error</tt>.
100
*/
101
public init(data: Data, options mask: XMLNode.Options = []) throws {
102
- let docPtr = _CFXMLDocPtrFromDataWithOptions((data as AnyObject) as! CFData, UInt32(mask.rawValue))
+ let docPtr = _CFXMLDocPtrFromDataWithOptions(unsafeBitCast(data as NSData, to: CFData.self), UInt32(mask.rawValue))
103
super.init(ptr: _CFXMLNodePtr(docPtr))
104
105
if mask.contains(.documentValidate) {
0 commit comments