Skip to content

Commit dd794f6

Browse files
authored
Merge pull request #15149 from ikesyo/remove-unnecessary-let
[gardening][SwiftOnoneSupport] Replace `let _` with `_`
2 parents cc48aa4 + 077aa52 commit dd794f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/public/SwiftOnoneSupport/SwiftOnoneSupport.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal enum _Prespecialize {
2525
var a = [Element](repeating: sampleValue, count: 1)
2626

2727
// Read array element
28-
let _ = a[0]
28+
_ = a[0]
2929

3030
// Set array elements
3131
for j in 1..<a.count {
@@ -42,7 +42,7 @@ internal enum _Prespecialize {
4242
a[0] = sampleValue
4343

4444
// Get count and capacity
45-
let _ = a.count + a.capacity
45+
_ = a.count + a.capacity
4646

4747
// Iterate over array
4848
for e in a {
@@ -63,7 +63,7 @@ internal enum _Prespecialize {
6363
a.reserveCapacity(100)
6464

6565
// Sort array
66-
let _ = a.sorted { (a: Element, b: Element) in a < b }
66+
_ = a.sorted { (a: Element, b: Element) in a < b }
6767
a.sort { (a: Element, b: Element) in a < b }
6868

6969
// force specialization of append.
@@ -80,7 +80,7 @@ internal enum _Prespecialize {
8080
var a = [Element](repeating: sampleValue, count: 1)
8181

8282
// Read array element
83-
let _ = a[0]
83+
_ = a[0]
8484

8585
// Set array elements
8686
for j in 0..<a.count {
@@ -96,7 +96,7 @@ internal enum _Prespecialize {
9696
a[0] = sampleValue
9797

9898
// Get length and capacity
99-
let _ = a.count + a.capacity
99+
_ = a.count + a.capacity
100100

101101
// Iterate over array
102102
for e in a {

0 commit comments

Comments
 (0)