Skip to content

Commit 2ffc3d5

Browse files
committed
[Foundation] Extract NSURL extensions into a seperate file
Non functional change; purely organization/gardening
1 parent b9da412 commit 2ffc3d5

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

stdlib/public/SDK/Foundation/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ add_swift_library(swiftFoundation ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SD
3939
NSStringEncodings.swift
4040
NSTextCheckingResult.swift
4141
NSUndoManager.swift
42+
NSURL.swift
4243
NSValue.swift.gyb
4344
PersonNameComponents.swift
4445
ReferenceConvertible.swift

stdlib/public/SDK/Foundation/Foundation.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,6 @@ public func NSLog(_ format: String, _ args: CVarArg...) {
4747
withVaList(args) { NSLogv(format, $0) }
4848
}
4949

50-
//===----------------------------------------------------------------------===//
51-
// Mirror/Quick Look Conformance
52-
//===----------------------------------------------------------------------===//
53-
54-
extension NSURL : CustomPlaygroundQuickLookable {
55-
public var customPlaygroundQuickLook: PlaygroundQuickLook {
56-
guard let str = absoluteString else { return .text("Unknown URL") }
57-
return .url(str)
58-
}
59-
}
60-
6150
//===----------------------------------------------------------------------===//
6251
// AnyHashable
6352
//===----------------------------------------------------------------------===//
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
@_exported import Foundation // Clang module
14+
15+
extension NSURL : CustomPlaygroundQuickLookable {
16+
public var customPlaygroundQuickLook: PlaygroundQuickLook {
17+
guard let str = absoluteString else { return .text("Unknown URL") }
18+
return .url(str)
19+
}
20+
}

0 commit comments

Comments
 (0)