Skip to content

Commit ae3bcab

Browse files
authored
Sync with 54a3597 in the Swift repository (#1428)
This only affects the Apple-platform implementation anyway.
1 parent e6b8b8e commit ae3bcab

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Foundation/Data.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ internal func __NSDataIsCompact(_ data: NSData) -> Bool {
5454
}
5555
}
5656

57-
@_silgen_name("__NSDataWriteToURL")
58-
internal func __NSDataWriteToURL(_ data: NSData, _ url: NSURL, _ options: UInt, _ error: NSErrorPointer) -> Bool
59-
6057
#endif
6158

6259
public final class _DataStorage {
@@ -1417,9 +1414,9 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
14171414
#else
14181415
if _shouldUseNonAtomicWriteReimplementation(options: options) {
14191416
var error: NSError? = nil
1420-
guard __NSDataWriteToURL($0, url as NSURL, options.rawValue, &error) else { throw error! }
1417+
guard __NSDataWriteToURL($0, url, options, &error) else { throw error! }
14211418
} else {
1422-
try $0.write(to: url, options: WritingOptions(rawValue: options.rawValue))
1419+
try $0.write(to: url, options: options)
14231420
}
14241421
#endif
14251422
}

0 commit comments

Comments
 (0)