Skip to content

Commit ef567f0

Browse files
committed
Reformat all source files with the new rules
1 parent a74a8a1 commit ef567f0

File tree

5 files changed

+7
-30
lines changed

5 files changed

+7
-30
lines changed

src/FSharp.Control.TaskSeq.Test/Nunit.Extensions.fs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ module ExtraCustomMatchers =
2222
let private baseResultTypeTest value =
2323
match value with
2424
| null ->
25-
EqualException.ForMismatchedValues(
26-
"Result type",
27-
"<null>",
28-
"Value <null> or None is never Result.Ok or Result.Error"
29-
)
25+
EqualException.ForMismatchedValues("Result type", "<null>", "Value <null> or None is never Result.Ok or Result.Error")
3026
|> raise
3127

3228
| _ ->
@@ -53,11 +49,7 @@ module ExtraCustomMatchers =
5349
| "None" -> None
5450
| _ ->
5551
raise
56-
<| EqualException.ForMismatchedValues(
57-
"Option type",
58-
ty.Name,
59-
"Unexpected field name for F# option type"
60-
)
52+
<| EqualException.ForMismatchedValues("Option type", ty.Name, "Unexpected field name for F# option type")
6153
else
6254
EqualException.ForMismatchedValues("Option type", ty.Name, "Type must be Option<_>")
6355
|> raise

src/FSharp.Control.TaskSeq.Test/TestUtils.fs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ type DummyTaskFactory(µsecMin: int64<µs>, µsecMax: int64<µs>) =
8787
let rnd = Random()
8888
let rnd () = rnd.NextInt64(int64 µsecMin, int64 µsecMax) * 1L<µs>
8989

90-
let runTaskDelayed () = backgroundTask {
91-
return! DelayHelper.delayTask µsecMin µsecMax (fun _ -> Interlocked.Increment &x)
92-
}
90+
let runTaskDelayed () = backgroundTask { return! DelayHelper.delayTask µsecMin µsecMax (fun _ -> Interlocked.Increment &x) }
9391

9492
let runTaskDelayedImmutable i = backgroundTask { return! DelayHelper.delayTask µsecMin µsecMax (fun _ -> i + 1) }
9593

@@ -513,9 +511,7 @@ module TestUtils =
513511
yield! taskSeq {
514512
yield! taskSeq {
515513
yield! taskSeq {
516-
yield! taskSeq {
517-
yield! taskSeq { yield! taskSeq { yield! taskSeq { yield! nestedTaskSeq } } }
518-
}
514+
yield! taskSeq { yield! taskSeq { yield! taskSeq { yield! taskSeq { yield! nestedTaskSeq } } } }
519515
}
520516
}
521517
}

src/FSharp.Control.TaskSeq/TaskExtensions.fs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ module TaskExtensions =
1919

2020
/// Used by `For`. F# currently doesn't support `while!`, so this cannot be called directly from the task CE
2121
/// This code is mostly a copy of TaskSeq.WhileAsync.
22-
member inline _.WhileAsync
23-
(
24-
[<InlineIfLambda>] condition: unit -> ValueTask<bool>,
25-
body: TaskCode<_, unit>
26-
) : TaskCode<_, _> =
22+
member inline _.WhileAsync([<InlineIfLambda>] condition: unit -> ValueTask<bool>, body: TaskCode<_, unit>) : TaskCode<_, _> =
2723
let mutable condition_res = true
2824

2925
// note that this While itself has both a dynamic and static implementation

src/FSharp.Control.TaskSeq/TaskSeq.fs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,7 @@ module TaskSeq =
265265

266266
let exactlyOne source =
267267
Internal.tryExactlyOne source
268-
|> Task.map (
269-
Option.defaultWith (fun () ->
270-
invalidArg (nameof source) "The input sequence contains more than one element.")
271-
)
268+
|> Task.map (Option.defaultWith (fun () -> invalidArg (nameof source) "The input sequence contains more than one element."))
272269

273270
let indexed (source: taskSeq<'T>) =
274271
Internal.checkNonNull (nameof source) source

src/FSharp.Control.TaskSeq/TaskSeqBuilder.fs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,7 @@ type TaskSeqBuilder() =
390390
ResumableCode.Combine(task1, task2)
391391

392392
/// Used by `For`. F# currently doesn't support `while!`, so this cannot be called directly from the CE
393-
member inline _.WhileAsync
394-
(
395-
[<InlineIfLambda>] condition: unit -> ValueTask<bool>,
396-
body: ResumableTSC<'T>
397-
) : ResumableTSC<'T> =
393+
member inline _.WhileAsync([<InlineIfLambda>] condition: unit -> ValueTask<bool>, body: ResumableTSC<'T>) : ResumableTSC<'T> =
398394
let mutable condition_res = true
399395

400396
ResumableCode.While(

0 commit comments

Comments
 (0)