Skip to content

Commit 35d5bb7

Browse files
authored
Merge pull request #226 from bartelink/spelling-tidying
Cleanup: Spelling, unused bindings
2 parents 2692bb1 + 42c9ad3 commit 35d5bb7

23 files changed

+93
-93
lines changed

src/FSharp.Control.TaskSeq.Test/FSharp.Control.TaskSeq.Test.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<ItemGroup>
99
<Compile Include="AssemblyInfo.fs" />
10-
<Compile Include="Nunit.Extensions.fs" />
10+
<Compile Include="Xunit.Extensions.fs" />
1111
<Compile Include="TestUtils.fs" />
1212
<Compile Include="TaskSeq.Append.Tests.fs" />
1313
<Compile Include="TaskSeq.Cast.Tests.fs" />

src/FSharp.Control.TaskSeq.Test/TaskSeq.AsyncExtensions.Tests.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ module EmptySeq =
2323
}
2424

2525
[<Fact>]
26-
let ``Async-for CE must execute side effect in empty taskseq`` () = async {
26+
let ``Async-for CE must execute side effect in empty taskSeq`` () = async {
2727
let mutable data = 0
2828
let values = taskSeq { do data <- 42 }
2929

30-
for x in values do
30+
for _ in values do
3131
()
3232

3333
data |> should equal 42
@@ -121,7 +121,7 @@ module Other =
121121
let disposed = ref 0
122122
let values = Gen.getEmptyDisposableTaskSeq disposed
123123

124-
for x in values do
124+
for _ in values do
125125
()
126126

127127
// the DisposeAsync should be called by now

src/FSharp.Control.TaskSeq.Test/TaskSeq.Collect.Tests.fs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ module SideEffects =
180180
// point of this test: just calling 'map' won't execute anything of the sequence!
181181
let _ =
182182
ts
183-
|> TaskSeq.collect (fun x -> taskSeq { yield 10 })
184-
|> TaskSeq.collect (fun x -> taskSeq { yield 10 })
185-
|> TaskSeq.collect (fun x -> taskSeq { yield 10 })
183+
|> TaskSeq.collect (fun _ -> taskSeq { yield 10 })
184+
|> TaskSeq.collect (fun _ -> taskSeq { yield 10 })
185+
|> TaskSeq.collect (fun _ -> taskSeq { yield 10 })
186186

187187
// multiple maps have no effect unless executed
188188
i |> should equal 0
@@ -201,9 +201,9 @@ module SideEffects =
201201
// point of this test: just calling 'map' won't execute anything of the sequence!
202202
let _ =
203203
ts
204-
|> TaskSeq.collectAsync (fun x -> task { return taskSeq { yield 10 } })
205-
|> TaskSeq.collectAsync (fun x -> task { return taskSeq { yield 10 } })
206-
|> TaskSeq.collectAsync (fun x -> task { return taskSeq { yield 10 } })
204+
|> TaskSeq.collectAsync (fun _ -> task { return taskSeq { yield 10 } })
205+
|> TaskSeq.collectAsync (fun _ -> task { return taskSeq { yield 10 } })
206+
|> TaskSeq.collectAsync (fun _ -> task { return taskSeq { yield 10 } })
207207

208208
// multiple maps have no effect unless executed
209209
i |> should equal 0
@@ -222,9 +222,9 @@ module SideEffects =
222222
// point of this test: just calling 'map' won't execute anything of the sequence!
223223
let _ =
224224
ts
225-
|> TaskSeq.collectSeq (fun x -> seq { yield 10 })
226-
|> TaskSeq.collectSeq (fun x -> seq { yield 10 })
227-
|> TaskSeq.collectSeq (fun x -> seq { yield 10 })
225+
|> TaskSeq.collectSeq (fun _ -> seq { yield 10 })
226+
|> TaskSeq.collectSeq (fun _ -> seq { yield 10 })
227+
|> TaskSeq.collectSeq (fun _ -> seq { yield 10 })
228228

229229
// multiple maps have no effect unless executed
230230
i |> should equal 0
@@ -243,9 +243,9 @@ module SideEffects =
243243
// point of this test: just calling 'map' won't execute anything of the sequence!
244244
let _ =
245245
ts
246-
|> TaskSeq.collectSeqAsync (fun x -> task { return seq { yield 10 } })
247-
|> TaskSeq.collectSeqAsync (fun x -> task { return seq { yield 10 } })
248-
|> TaskSeq.collectSeqAsync (fun x -> task { return seq { yield 10 } })
246+
|> TaskSeq.collectSeqAsync (fun _ -> task { return seq { yield 10 } })
247+
|> TaskSeq.collectSeqAsync (fun _ -> task { return seq { yield 10 } })
248+
|> TaskSeq.collectSeqAsync (fun _ -> task { return seq { yield 10 } })
249249

250250
// multiple maps have no effect unless executed
251251
i |> should equal 0

src/FSharp.Control.TaskSeq.Test/TaskSeq.Do.Tests.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ let ``CE taskSeq: use 'do!' with a task<unit>`` () =
2222
|> Task.map (fun _ -> value |> should equal 1)
2323

2424
[<Fact>]
25-
let ``CE taskSeq: use 'do!' with a valuetask<unit>`` () =
25+
let ``CE taskSeq: use 'do!' with a ValueTask<unit>`` () =
2626
let mutable value = 0
2727

2828
taskSeq { do! ValueTask.ofTask (task { do value <- value + 1 }) }
2929
|> verifyEmpty
3030
|> Task.map (fun _ -> value |> should equal 1)
3131

3232
[<Fact>]
33-
let ``CE taskSeq: use 'do!' with a non-generic valuetask`` () =
33+
let ``CE taskSeq: use 'do!' with a non-generic ValueTask`` () =
3434
let mutable value = 0
3535

3636
taskSeq { do! ValueTask(task { do value <- value + 1 }) }
@@ -92,7 +92,7 @@ let ``CE taskSeq: use 'do!' with all kinds of overloads at once`` () =
9292
do! task { do value <- value + 1 } |> Task.ignore
9393
do! ValueTask <| task { do value <- value + 1 }
9494
do! ValueTask.ofTask (task { do value <- value + 1 })
95-
do! ValueTask<_>(()) // unit valuetask that completes immediately
95+
do! ValueTask<_>(()) // unit ValueTask that completes immediately
9696
do! Task.fromResult (()) // unit Task that completes immediately
9797
do! Task.Delay 0
9898
do! Async.Sleep 0

src/FSharp.Control.TaskSeq.Test/TaskSeq.Filter.Tests.fs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module TaskSeq.Tests.Filter
22

3-
open System
4-
53
open Xunit
64
open FsUnit.Xunit
75

src/FSharp.Control.TaskSeq.Test/TaskSeq.Head.Tests.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ module SideEffects =
9898
x <- x + 1 // we never get here
9999
}
100100

101-
let! fortytwo = one |> TaskSeq.head
101+
let! fortyTwo = one |> TaskSeq.head
102102
let! stillFortyTwo = one |> TaskSeq.head // the statement after 'yield' will never be reached
103103

104-
fortytwo |> should equal 42
104+
fortyTwo |> should equal 42
105105
stillFortyTwo |> should equal 42
106106
}
107107

@@ -114,8 +114,8 @@ module SideEffects =
114114
x <- x + 1 // we never get here
115115
}
116116

117-
let! fortytwo = one |> TaskSeq.tryHead
118-
fortytwo |> should equal (Some 42)
117+
let! fortyTwo = one |> TaskSeq.tryHead
118+
fortyTwo |> should equal (Some 42)
119119

120120
// the statement after 'yield' will never be reached, the mutable will not be updated
121121
let! stillFortyTwo = one |> TaskSeq.tryHead

src/FSharp.Control.TaskSeq.Test/TaskSeq.Last.Tests.fs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ module SideEffects =
109109
x <- x + 1
110110
}
111111

112-
let! fortytwo = one |> TaskSeq.last
113-
let! fortythree = one |> TaskSeq.last // side effect, re-iterating!
112+
let! fortyTwo = one |> TaskSeq.last
113+
let! fortyThree = one |> TaskSeq.last // side effect, re-iterating!
114114

115-
fortytwo |> should equal 42
116-
fortythree |> should equal 43
115+
fortyTwo |> should equal 42
116+
fortyThree |> should equal 43
117117
}
118118

119119
[<Fact>]
@@ -125,13 +125,12 @@ module SideEffects =
125125
x <- x + 1
126126
}
127127

128-
let! fortytwo = one |> TaskSeq.tryLast
129-
fortytwo |> should equal (Some 42)
128+
let! fortyTwo = one |> TaskSeq.tryLast
129+
fortyTwo |> should equal (Some 42)
130130

131131
// side effect, reiterating causes it to execute again!
132-
let! fortythree = one |> TaskSeq.tryLast
133-
fortythree |> should equal (Some 43)
134-
132+
let! fortyThree = one |> TaskSeq.tryLast
133+
fortyThree |> should equal (Some 43)
135134
}
136135

137136
[<Theory; ClassData(typeof<TestSideEffectTaskSeq>)>]

src/FSharp.Control.TaskSeq.Test/TaskSeq.Length.Tests.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module Immutable =
8989
do! run (fun x -> x % 3 = 2) |> Task.map (should equal 3) // [2; 5; 8]
9090
}
9191

92-
module SideSeffects =
92+
module SideEffects =
9393
[<Fact>]
9494
let ``TaskSeq-length prove we execute after-effects`` () = task {
9595
let mutable i = 0

src/FSharp.Control.TaskSeq.Test/TaskSeq.Let.Tests.fs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module TaskSeq.Tests.Let
22

3-
open System
43
open System.Threading.Tasks
54

65
open FsUnit
@@ -41,7 +40,7 @@ let ``CE taskSeq: use 'let!' with a task<string>`` () =
4140
|> Task.map (should equal "test")
4241

4342
[<Fact>]
44-
let ``CE taskSeq: use 'let!' with a valuetask<unit>`` () =
43+
let ``CE taskSeq: use 'let!' with a ValueTask<unit>`` () =
4544
let mutable value = 0
4645

4746
taskSeq {
@@ -52,7 +51,7 @@ let ``CE taskSeq: use 'let!' with a valuetask<unit>`` () =
5251
|> Task.map (fun _ -> value |> should equal 1)
5352

5453
[<Fact>]
55-
let ``CE taskSeq: use 'let!' with a valuetask<string>`` () =
54+
let ``CE taskSeq: use 'let!' with a ValueTask<string>`` () =
5655
taskSeq {
5756
let! test = ValueTask.ofTask (task { return "test" })
5857
yield test
@@ -61,7 +60,7 @@ let ``CE taskSeq: use 'let!' with a valuetask<string>`` () =
6160
|> Task.map (should equal "test")
6261

6362
[<Fact>]
64-
let ``CE taskSeq: use 'let!' with a non-generic valuetask`` () =
63+
let ``CE taskSeq: use 'let!' with a non-generic ValueTask`` () =
6564
let mutable value = 0
6665

6766
taskSeq {
@@ -136,7 +135,7 @@ let ``CE taskSeq: use 'let!' with all kinds of overloads at once`` () =
136135
}
137136
|> ValueTask<int>
138137

139-
let! c = ValueTask<_>(4) // valuetask that completes immediately
138+
let! c = ValueTask<_>(4) // ValueTask that completes immediately
140139
let! _ = Task.Factory.StartNew(fun () -> value <- value + 1) // non-generic Task with side effect
141140
let! d = Task.fromResult 99 // normal Task that completes immediately
142141
let! _ = Async.Sleep 0 // unit Async

src/FSharp.Control.TaskSeq.Test/TaskSeq.Map.Tests.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ module SideEffects =
182182

183183

184184
[<Theory; ClassData(typeof<TestSideEffectTaskSeq>)>]
185-
let ``TaskSeq-map can access mutables which are mutated in correct order`` variant =
185+
let ``TaskSeq-map can access mutables that are mutated in correct order`` variant =
186186
let mutable sum = 0
187187

188188
Gen.getSeqWithSideEffect variant
189-
|> TaskSeq.map (fun item ->
189+
|> TaskSeq.map (fun _ ->
190190
sum <- sum + 1
191191
char (sum + 64))
192192
|> validateSequence
@@ -221,7 +221,7 @@ module SideEffects =
221221
let mutable sum = 0
222222

223223
Gen.getSeqWithSideEffect variant
224-
|> TaskSeq.mapAsync (fun item -> task {
224+
|> TaskSeq.mapAsync (fun _ -> task {
225225
sum <- sum + 1
226226
return char (sum + 64)
227227
})

0 commit comments

Comments
 (0)