Skip to content

Commit cd91d1c

Browse files
committed
[gardening] Remove unnecessary wildcard patterns
1 parent 8fa640f commit cd91d1c

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

Foundation/Boxing.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ extension _MutablePairBoxing {
180180

181181
// This check is done twice becaue: <rdar://problem/24939065> Value kept live for too long causing uniqueness check to fail
182182
switch (wrapper) {
183-
case .Immutable(_):
183+
case .Immutable:
184184
break
185-
case .Mutable(_):
185+
case .Mutable:
186186
unique = isKnownUniquelyReferenced(&_wrapped)
187187
}
188188

Foundation/IndexPath.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public struct IndexPath : ReferenceConvertible, Equatable, Hashable, MutableColl
6969
switch self {
7070
case .empty:
7171
return .empty
72-
case .single(_):
72+
case .single:
7373
return .empty
7474
case .pair(let first, _):
7575
return .single(first)
@@ -237,7 +237,7 @@ public struct IndexPath : ReferenceConvertible, Equatable, Hashable, MutableColl
237237
case .empty:
238238
fatalError("index \(index) out of bounds of count 0")
239239
break
240-
case .single(_):
240+
case .single:
241241
precondition(index == 0, "index \(index) out of bounds of count 1")
242242
self = .single(newValue)
243243
break

Foundation/IndexSet.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,9 @@ public struct IndexSet : ReferenceConvertible, Equatable, BidirectionalCollectio
662662
// This check is done twice because: <rdar://problem/24939065> Value kept live for too long causing uniqueness check to fail
663663
var unique = true
664664
switch _handle._pointer {
665-
case .Default(_):
665+
case .Default:
666666
break
667-
case .Mutable(_):
667+
case .Mutable:
668668
unique = isKnownUniquelyReferenced(&_handle)
669669
}
670670

Foundation/NSURLRequest.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ open class NSURLRequest : NSObject, NSSecureCoding, NSCopying, NSMutableCopying
320320
switch body {
321321
case .data(let data):
322322
return data
323-
case .stream(_):
323+
case .stream:
324324
return nil
325325
}
326326
}
@@ -330,7 +330,7 @@ open class NSURLRequest : NSObject, NSSecureCoding, NSCopying, NSMutableCopying
330330
open var httpBodyStream: InputStream? {
331331
if let body = _body {
332332
switch body {
333-
case .data(_):
333+
case .data:
334334
return nil
335335
case .stream(let stream):
336336
return stream
@@ -482,7 +482,7 @@ open class NSMutableURLRequest : NSURLRequest {
482482
switch body {
483483
case .data(let data):
484484
return data
485-
case .stream(_):
485+
case .stream:
486486
return nil
487487
}
488488
}
@@ -501,7 +501,7 @@ open class NSMutableURLRequest : NSURLRequest {
501501
get {
502502
if let body = _body {
503503
switch body {
504-
case .data(_):
504+
case .data:
505505
return nil
506506
case .stream(let stream):
507507
return stream

Foundation/URLSession/http/HTTPURLProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ internal extension _HTTPURLProtocol {
336336
switch session.behaviour(for: self.task!) {
337337
case .noDelegate:
338338
break
339-
case .taskDelegate(_):
339+
case .taskDelegate:
340340
//TODO: There's a problem with libcurl / with how we're using it.
341341
// We're currently unable to pause the transfer / the easy handle:
342342
// https://curl.haxx.se/mail/lib-2016-03/0222.html

0 commit comments

Comments
 (0)