From 6575964d9b596617420d5123c3d776422a017d81 Mon Sep 17 00:00:00 2001 From: Ruben Bartelink Date: Sun, 24 Dec 2023 12:19:31 +0000 Subject: [PATCH] Typos/ignores --- .../TaskSeq.AsyncExtensions.Tests.fs | 6 ++-- .../TaskSeq.Collect.Tests.fs | 24 +++++++------- .../TaskSeq.Do.Tests.fs | 8 ++--- .../TaskSeq.Filter.Tests.fs | 2 -- .../TaskSeq.Head.Tests.fs | 8 ++--- .../TaskSeq.Last.Tests.fs | 17 +++++----- .../TaskSeq.Length.Tests.fs | 2 +- .../TaskSeq.Let.Tests.fs | 9 +++--- .../TaskSeq.Map.Tests.fs | 6 ++-- .../TaskSeq.Realworld.fs | 4 +-- .../TaskSeq.Skip.Tests.fs | 2 +- .../TaskSeq.SkipWhile.Tests.fs | 2 -- ...Seq.StateTransitionBug-delayed.Tests.CE.fs | 2 +- .../TaskSeq.StateTransitionBug.Tests.CE.fs | 10 +++--- .../TaskSeq.Take.Tests.fs | 6 ++-- .../TaskSeq.TakeWhile.Tests.fs | 2 -- .../TaskSeq.TaskExtensions.Tests.fs | 6 ++-- .../TaskSeq.Tests.CE.fs | 32 +++++++++---------- 18 files changed, 70 insertions(+), 78 deletions(-) diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.AsyncExtensions.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.AsyncExtensions.Tests.fs index 62d58368..f36fe920 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.AsyncExtensions.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.AsyncExtensions.Tests.fs @@ -23,11 +23,11 @@ module EmptySeq = } [] - let ``Async-for CE must execute side effect in empty taskseq`` () = async { + let ``Async-for CE must execute side effect in empty taskSeq`` () = async { let mutable data = 0 let values = taskSeq { do data <- 42 } - for x in values do + for _ in values do () data |> should equal 42 @@ -121,7 +121,7 @@ module Other = let disposed = ref 0 let values = Gen.getEmptyDisposableTaskSeq disposed - for x in values do + for _ in values do () // the DisposeAsync should be called by now diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Collect.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Collect.Tests.fs index 48b1ec41..ae31dd85 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Collect.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Collect.Tests.fs @@ -180,9 +180,9 @@ module SideEffects = // point of this test: just calling 'map' won't execute anything of the sequence! let _ = ts - |> TaskSeq.collect (fun x -> taskSeq { yield 10 }) - |> TaskSeq.collect (fun x -> taskSeq { yield 10 }) - |> TaskSeq.collect (fun x -> taskSeq { yield 10 }) + |> TaskSeq.collect (fun _ -> taskSeq { yield 10 }) + |> TaskSeq.collect (fun _ -> taskSeq { yield 10 }) + |> TaskSeq.collect (fun _ -> taskSeq { yield 10 }) // multiple maps have no effect unless executed i |> should equal 0 @@ -201,9 +201,9 @@ module SideEffects = // point of this test: just calling 'map' won't execute anything of the sequence! let _ = ts - |> TaskSeq.collectAsync (fun x -> task { return taskSeq { yield 10 } }) - |> TaskSeq.collectAsync (fun x -> task { return taskSeq { yield 10 } }) - |> TaskSeq.collectAsync (fun x -> task { return taskSeq { yield 10 } }) + |> TaskSeq.collectAsync (fun _ -> task { return taskSeq { yield 10 } }) + |> TaskSeq.collectAsync (fun _ -> task { return taskSeq { yield 10 } }) + |> TaskSeq.collectAsync (fun _ -> task { return taskSeq { yield 10 } }) // multiple maps have no effect unless executed i |> should equal 0 @@ -222,9 +222,9 @@ module SideEffects = // point of this test: just calling 'map' won't execute anything of the sequence! let _ = ts - |> TaskSeq.collectSeq (fun x -> seq { yield 10 }) - |> TaskSeq.collectSeq (fun x -> seq { yield 10 }) - |> TaskSeq.collectSeq (fun x -> seq { yield 10 }) + |> TaskSeq.collectSeq (fun _ -> seq { yield 10 }) + |> TaskSeq.collectSeq (fun _ -> seq { yield 10 }) + |> TaskSeq.collectSeq (fun _ -> seq { yield 10 }) // multiple maps have no effect unless executed i |> should equal 0 @@ -243,9 +243,9 @@ module SideEffects = // point of this test: just calling 'map' won't execute anything of the sequence! let _ = ts - |> TaskSeq.collectSeqAsync (fun x -> task { return seq { yield 10 } }) - |> TaskSeq.collectSeqAsync (fun x -> task { return seq { yield 10 } }) - |> TaskSeq.collectSeqAsync (fun x -> task { return seq { yield 10 } }) + |> TaskSeq.collectSeqAsync (fun _ -> task { return seq { yield 10 } }) + |> TaskSeq.collectSeqAsync (fun _ -> task { return seq { yield 10 } }) + |> TaskSeq.collectSeqAsync (fun _ -> task { return seq { yield 10 } }) // multiple maps have no effect unless executed i |> should equal 0 diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Do.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Do.Tests.fs index 1f8badae..d206346f 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Do.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Do.Tests.fs @@ -22,7 +22,7 @@ let ``CE taskSeq: use 'do!' with a task`` () = |> Task.map (fun _ -> value |> should equal 1) [] -let ``CE taskSeq: use 'do!' with a valuetask`` () = +let ``CE taskSeq: use 'do!' with a valueTask`` () = let mutable value = 0 taskSeq { do! ValueTask.ofTask (task { do value <- value + 1 }) } @@ -30,7 +30,7 @@ let ``CE taskSeq: use 'do!' with a valuetask`` () = |> Task.map (fun _ -> value |> should equal 1) [] -let ``CE taskSeq: use 'do!' with a non-generic valuetask`` () = +let ``CE taskSeq: use 'do!' with a non-generic valueTask`` () = let mutable value = 0 taskSeq { do! ValueTask(task { do value <- value + 1 }) } @@ -92,8 +92,8 @@ let ``CE taskSeq: use 'do!' with all kinds of overloads at once`` () = do! task { do value <- value + 1 } |> Task.ignore do! ValueTask <| task { do value <- value + 1 } do! ValueTask.ofTask (task { do value <- value + 1 }) - do! ValueTask<_>(()) // unit valuetask that completes immediately - do! Task.fromResult (()) // unit Task that completes immediately + do! ValueTask<_>(()) // unit valueTask that completes immediately + do! Task.fromResult () // unit Task that completes immediately do! Task.Delay 0 do! Async.Sleep 0 do! async { value <- value + 1 } // eq 4 diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Filter.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Filter.Tests.fs index 0e189cc5..bc0fe54d 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Filter.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Filter.Tests.fs @@ -1,7 +1,5 @@ module TaskSeq.Tests.Filter -open System - open Xunit open FsUnit.Xunit diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Head.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Head.Tests.fs index af4cd8fc..1450e9f5 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Head.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Head.Tests.fs @@ -98,10 +98,10 @@ module SideEffects = x <- x + 1 // we never get here } - let! fortytwo = one |> TaskSeq.head + let! fortyTwo = one |> TaskSeq.head let! stillFortyTwo = one |> TaskSeq.head // the statement after 'yield' will never be reached - fortytwo |> should equal 42 + fortyTwo |> should equal 42 stillFortyTwo |> should equal 42 } @@ -114,8 +114,8 @@ module SideEffects = x <- x + 1 // we never get here } - let! fortytwo = one |> TaskSeq.tryHead - fortytwo |> should equal (Some 42) + let! fortyTwo = one |> TaskSeq.tryHead + fortyTwo |> should equal (Some 42) // the statement after 'yield' will never be reached, the mutable will not be updated let! stillFortyTwo = one |> TaskSeq.tryHead diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Last.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Last.Tests.fs index c74e8136..47eed383 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Last.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Last.Tests.fs @@ -109,11 +109,11 @@ module SideEffects = x <- x + 1 } - let! fortytwo = one |> TaskSeq.last - let! fortythree = one |> TaskSeq.last // side effect, re-iterating! + let! fortyTwo = one |> TaskSeq.last + let! fortyThree = one |> TaskSeq.last // side effect, re-iterating! - fortytwo |> should equal 42 - fortythree |> should equal 43 + fortyTwo |> should equal 42 + fortyThree |> should equal 43 } [] @@ -125,13 +125,12 @@ module SideEffects = x <- x + 1 } - let! fortytwo = one |> TaskSeq.tryLast - fortytwo |> should equal (Some 42) + let! fortyTwo = one |> TaskSeq.tryLast + fortyTwo |> should equal (Some 42) // side effect, reiterating causes it to execute again! - let! fortythree = one |> TaskSeq.tryLast - fortythree |> should equal (Some 43) - + let! fortyThree = one |> TaskSeq.tryLast + fortyThree |> should equal (Some 43) } [)>] diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Length.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Length.Tests.fs index ac8c3882..f8f0bfeb 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Length.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Length.Tests.fs @@ -89,7 +89,7 @@ module Immutable = do! run (fun x -> x % 3 = 2) |> Task.map (should equal 3) // [2; 5; 8] } -module SideSeffects = +module SideEffects = [] let ``TaskSeq-length prove we execute after-effects`` () = task { let mutable i = 0 diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Let.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Let.Tests.fs index e7c37844..928e5ad3 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Let.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Let.Tests.fs @@ -1,6 +1,5 @@ module TaskSeq.Tests.Let -open System open System.Threading.Tasks open FsUnit @@ -41,7 +40,7 @@ let ``CE taskSeq: use 'let!' with a task`` () = |> Task.map (should equal "test") [] -let ``CE taskSeq: use 'let!' with a valuetask`` () = +let ``CE taskSeq: use 'let!' with a valueTask`` () = let mutable value = 0 taskSeq { @@ -52,7 +51,7 @@ let ``CE taskSeq: use 'let!' with a valuetask`` () = |> Task.map (fun _ -> value |> should equal 1) [] -let ``CE taskSeq: use 'let!' with a valuetask`` () = +let ``CE taskSeq: use 'let!' with a valueTask`` () = taskSeq { let! test = ValueTask.ofTask (task { return "test" }) yield test @@ -61,7 +60,7 @@ let ``CE taskSeq: use 'let!' with a valuetask`` () = |> Task.map (should equal "test") [] -let ``CE taskSeq: use 'let!' with a non-generic valuetask`` () = +let ``CE taskSeq: use 'let!' with a non-generic valueTask`` () = let mutable value = 0 taskSeq { @@ -136,7 +135,7 @@ let ``CE taskSeq: use 'let!' with all kinds of overloads at once`` () = } |> ValueTask - let! c = ValueTask<_>(4) // valuetask that completes immediately + let! c = ValueTask<_>(4) // valueTask that completes immediately let! _ = Task.Factory.StartNew(fun () -> value <- value + 1) // non-generic Task with side effect let! d = Task.fromResult 99 // normal Task that completes immediately let! _ = Async.Sleep 0 // unit Async diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Map.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Map.Tests.fs index e266b3c9..daf50a94 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Map.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Map.Tests.fs @@ -182,11 +182,11 @@ module SideEffects = [)>] - let ``TaskSeq-map can access mutables which are mutated in correct order`` variant = + let ``TaskSeq-map can access mutables that are mutated in correct order`` variant = let mutable sum = 0 Gen.getSeqWithSideEffect variant - |> TaskSeq.map (fun item -> + |> TaskSeq.map (fun _ -> sum <- sum + 1 char (sum + 64)) |> validateSequence @@ -221,7 +221,7 @@ module SideEffects = let mutable sum = 0 Gen.getSeqWithSideEffect variant - |> TaskSeq.mapAsync (fun item -> task { + |> TaskSeq.mapAsync (fun _ -> task { sum <- sum + 1 return char (sum + 64) }) diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Realworld.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Realworld.fs index f7c8594f..ac9baeef 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Realworld.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Realworld.fs @@ -13,14 +13,14 @@ open Xunit.Abstractions /// Just a naive, simple in-memory reader that acts as an IAsyncEnumerable to use with tests /// IMPORTANT: currently this is not thread-safe!!! -type AsyncBufferedReader(output: ITestOutputHelper, data, blockSize) = +type AsyncBufferedReader(_output: ITestOutputHelper, data, blockSize) = let stream = new MemoryStream(data: byte[]) let buffered = new BufferedStream(stream, blockSize) let mutable current = ValueNone let mutable lastPos = 0L interface IAsyncEnumerable with - member reader.GetAsyncEnumerator(ct) = + member reader.GetAsyncEnumerator _ = { new IAsyncEnumerator<_> with member this.Current = (reader :> IAsyncEnumerator<_>).Current member this.MoveNextAsync() = (reader :> IAsyncEnumerator<_>).MoveNextAsync() diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Skip.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Skip.Tests.fs index c44e4841..660fa939 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Skip.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Skip.Tests.fs @@ -194,7 +194,7 @@ module SideEffects = } [] - let ``TaskSeq-skip prove that an exception from the taskseq is thrown instead of exception from function`` () = + let ``TaskSeq-skip prove that an exception from the taskSeq is thrown instead of exception from function`` () = let items = taskSeq { yield 42 yield! [ 1; 2 ] diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.SkipWhile.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.SkipWhile.Tests.fs index b0bf214e..246a1fe8 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.SkipWhile.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.SkipWhile.Tests.fs @@ -1,7 +1,5 @@ module TaskSeq.Tests.skipWhile -open System - open Xunit open FsUnit.Xunit diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.StateTransitionBug-delayed.Tests.CE.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.StateTransitionBug-delayed.Tests.CE.fs index 8eb699bf..8dc5a2b6 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.StateTransitionBug-delayed.Tests.CE.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.StateTransitionBug-delayed.Tests.CE.fs @@ -79,7 +79,7 @@ let ``CE taskSeq, MoveNext too far`` () = task { do! Assert.moveNextAndCheck false enum // third item: false // then call it bunch of times to ensure we don't get an InvalidOperationException, see issue #39 and PR #42 - for i in 0..100 do + for _ in 0..100 do do! Assert.moveNextAndCheck false enum // after whatever amount of time MoveNextAsync, we can still safely call Current diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.StateTransitionBug.Tests.CE.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.StateTransitionBug.Tests.CE.fs index 0861911e..154f3a17 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.StateTransitionBug.Tests.CE.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.StateTransitionBug.Tests.CE.fs @@ -11,7 +11,7 @@ open FSharp.Control [] let ``CE empty taskSeq with MoveNextAsync -- untyped`` () = task { - let tskSeq = taskSeq { do ignore () } + let tskSeq = taskSeq { do () } Assert.IsAssignableFrom>(tskSeq) |> ignore @@ -41,7 +41,7 @@ let ``CE empty taskSeq, GetAsyncEnumerator multiple times`` variant = task { [)>] let ``CE empty taskSeq, GetAsyncEnumerator multiple times and then MoveNextAsync`` variant = task { let tskSeq = Gen.getEmptyVariant variant - use enumerator = tskSeq.GetAsyncEnumerator() + use _enumerator = tskSeq.GetAsyncEnumerator() use enumerator = tskSeq.GetAsyncEnumerator() do! Assert.moveNextAndCheck false enumerator } @@ -86,7 +86,7 @@ let ``CE empty taskSeq, GetAsyncEnumerator + MoveNextAsync 100x in a loop`` vari let tskSeq = Gen.getEmptyVariant variant // let's get the enumerator a few times - for i in 0..100 do + for _ in 0..100 do use enumerator = tskSeq.GetAsyncEnumerator() do! Assert.moveNextAndCheck false enumerator // these are all empty } @@ -202,7 +202,7 @@ let ``CE taskSeq, MoveNext too far`` () = task { do! Assert.moveNextAndCheck false enum // third item: false // then call it bunch of times to ensure we don't get an InvalidOperationException, see issue #39 and PR #42 - for i in 0..100 do + for _ in 0..100 do do! Assert.moveNextAndCheck false enum // after whatever amount of time MoveNextAsync, we can still safely call Current @@ -234,7 +234,7 @@ let ``CE taskSeq, call GetAsyncEnumerator twice, both should have equal behavior [] let ``CE seq -- comparison --, call GetEnumerator twice`` () = task { - // this test is for behavioral comparisoni between the same Async test above with TaskSeq + // this test is for behavioral comparison between the same Async test above with TaskSeq let sq = seq { yield 1 yield 2 diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Take.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Take.Tests.fs index 9e633a38..89078b1e 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Take.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Take.Tests.fs @@ -192,7 +192,7 @@ module SideEffects = first |> should equal expected repeat |> should equal expected // if we read too far, this is now [|43, 86|] - x |> should equal 42 // expect: side-effect at end of taskseq not executed + x |> should equal 42 // expect: side-effect at end of taskSeq not executed } [] @@ -207,7 +207,7 @@ module SideEffects = [] - let ``TaskSeq-take prove that an exception from the taskseq is thrown instead of exception from function`` () = + let ``TaskSeq-take prove that an exception from the taskSeq is thrown instead of exception from function`` () = let items = taskSeq { yield 42 yield! [ 1; 2 ] @@ -235,5 +235,5 @@ module SideEffects = first |> should equal expected repeat |> should equal expected // if we read too far, this is now [|43, 86|] - x |> should equal 42 // expect: side-effect at end of taskseq not executed + x |> should equal 42 // expect: side-effect at end of taskSeq not executed } diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.TakeWhile.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.TakeWhile.Tests.fs index 81fc3bf4..91565217 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.TakeWhile.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.TakeWhile.Tests.fs @@ -1,7 +1,5 @@ module TaskSeq.Tests.TakeWhile -open System - open Xunit open FsUnit.Xunit diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.TaskExtensions.Tests.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.TaskExtensions.Tests.fs index 0121663f..d50b8667 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.TaskExtensions.Tests.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.TaskExtensions.Tests.fs @@ -23,11 +23,11 @@ module EmptySeq = } [] - let ``Task-for CE must execute side effect in empty taskseq`` () = task { + let ``Task-for CE must execute side effect in empty taskSeq`` () = task { let mutable data = 0 let values = taskSeq { do data <- 42 } - for x in values do + for _ in values do () data |> should equal 42 @@ -120,7 +120,7 @@ module Other = let disposed = ref 0 let values = Gen.getEmptyDisposableTaskSeq disposed - for x in values do + for _ in values do () // the DisposeAsync should be called by now diff --git a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Tests.CE.fs b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Tests.CE.fs index 4ae88e66..3c73e77a 100644 --- a/src/FSharp.Control.TaskSeq.Test/TaskSeq.Tests.CE.fs +++ b/src/FSharp.Control.TaskSeq.Test/TaskSeq.Tests.CE.fs @@ -38,10 +38,10 @@ let ``CE taskSeq with nested yield!`` () = task { let control = seq { yield! [ 1..10 ] - for i in 0..9 do + for _ in 0..9 do yield! [ 1..2 ] - for i in 0..2 do + for _ in 0..2 do yield! seq { yield 42 } for i in 100..102 do @@ -51,10 +51,10 @@ let ``CE taskSeq with nested yield!`` () = task { let tskSeq = taskSeq { yield! Gen.sideEffectTaskSeq 10 - for i in 0..9 do + for _ in 0..9 do yield! Gen.sideEffectTaskSeq 2 - for i in 0..2 do + for _ in 0..2 do yield! taskSeq { yield 42 } for i in 100..102 do @@ -87,31 +87,31 @@ let ``CE taskSeq with nested deeply yield! perf test 8521 nested tasks`` () = ta yield! createTasks 10 // nestings amount to 8512 sequences of [1;2] - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 - for i in 0..2 do + for _ in 0..2 do yield! createTasks 2 yield! TaskSeq.empty @@ -153,7 +153,7 @@ let ``CE taskSeq: 1000 TaskDelay-delayed tasks using yield!`` () = task { [] let ``CE taskSeq: 1000 sync-running tasks using yield!`` () = task { // Smoke performance test - // Runs in a few 10's of ms, because of absense of Task.Delay + // Runs in a few 10's of ms, because of absence of Task.Delay // should generally be about as fast as `task`, see below let tskSeq = taskSeq { yield! Gen.sideEffectTaskSeq_Sequential 1000 } let! data = tskSeq |> TaskSeq.toListAsync @@ -185,7 +185,7 @@ let ``CE task: 1000 TaskDelay-delayed tasks using for-loop`` () = task { [] let ``CE task: 1000 list of sync-running tasks using for-loop`` () = task { - // runs in a few 10's of ms, because of absense of Task.Delay + // runs in a few 10's of ms, because of absence of Task.Delay // for smoke-test comparison with taskSeq let tasks = DummyTaskFactory().CreateDirectTasks_SideEffect 1000 let mutable i = 0 @@ -199,7 +199,7 @@ let ``CE task: 1000 list of sync-running tasks using for-loop`` () = task { [] let ``CE task: 5000 list of sync-running tasks using for-loop`` () = task { - // runs in a few 100's of ms, because of absense of Task.Delay + // runs in a few 100's of ms, because of absence of Task.Delay // for smoke-test comparison with taskSeq let tasks = DummyTaskFactory().CreateDirectTasks_SideEffect 5000 let mutable i = 0