Skip to content

Commit ca4d5a4

Browse files
committed
[Backtracing] Remove unsafeFirst from Utils.swift.
It looks like we aren't actually using it, so let's just delete it. rdar://136977833
1 parent f4cf108 commit ca4d5a4

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

stdlib/public/libexec/swift-backtrace/Utils.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,6 @@ internal func exists(_ path: String) -> Bool {
159159
return true
160160
}
161161

162-
extension Sequence {
163-
/// Return the first element in a Sequence.
164-
///
165-
/// This is not, in general, a safe thing to do, because the sequence might
166-
/// not be restartable. For the cases where we're using it here, it's OK
167-
/// though.
168-
public var unsafeFirst: Element? {
169-
var iterator = makeIterator()
170-
return iterator.next()
171-
}
172-
}
173-
174162
struct CFileStream: TextOutputStream {
175163
var fp: UnsafeMutablePointer<FILE>
176164

0 commit comments

Comments
 (0)