Skip to content

Commit f32faad

Browse files
committed
remove code depending on Swift older than 5.6
1 parent a3aff2f commit f32faad

File tree

2 files changed

+0
-157
lines changed

2 files changed

+0
-157
lines changed

Sources/System/FilePath/FilePathComponentView.swift

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,6 @@ extension FilePath {
3939
}
4040
}
4141

42-
#if SYSTEM_PACKAGE // Workaround for a __consuming getter bug in Swift 5.3.3
43-
/// View the non-root components that make up this path.
44-
public var components: ComponentView {
45-
get { ComponentView(self) }
46-
_modify {
47-
// RRC's empty init means that we can't guarantee that the yielded
48-
// view will restore our root. So copy it out first.
49-
//
50-
// TODO(perf): Small-form root (especially on Unix). Have Root
51-
// always copy out (not worth ref counting). Make sure that we're
52-
// not needlessly sliding values around or triggering a COW
53-
let rootStr = self.root?._systemString ?? SystemString()
54-
var comp = ComponentView(self)
55-
self = FilePath()
56-
defer {
57-
self = comp._path
58-
if root?._slice.elementsEqual(rootStr) != true {
59-
self.root = Root(rootStr)
60-
}
61-
}
62-
yield &comp
63-
}
64-
}
65-
#else
6642
/// View the non-root components that make up this path.
6743
public var components: ComponentView {
6844
__consuming get { ComponentView(self) }
@@ -85,7 +61,6 @@ extension FilePath {
8561
yield &comp
8662
}
8763
}
88-
#endif
8964
}
9065

9166
@available(/*System 0.0.2: macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0*/iOS 8, *)

Tests/SystemTests/XCTestManifests.swift

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

0 commit comments

Comments
 (0)