Skip to content

Commit 1998b98

Browse files
committed
Format the world
1 parent 6802608 commit 1998b98

File tree

16 files changed

+71
-109
lines changed

16 files changed

+71
-109
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"rollForward": false
1818
},
1919
"fantomas": {
20-
"version": "6.3.16",
20+
"version": "7.0.0",
2121
"commands": [
2222
"fantomas"
2323
],

.fantomasignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
AssemblyInfo.fs
2-
src/FsToolkit.ErrorHandling/Nullness.fs
32
tests/FsToolkit.ErrorHandling.AsyncSeq.Tests/Main.fs
4-
tests/FsToolkit.ErrorHandling.Tests/Main.fs
5-
tests/FsToolkit.ErrorHandling.Tests/TestHelpers.fs
3+
tests/FsToolkit.ErrorHandling.Tests/Main.fs

build/build.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ let formatCode _ =
146146
Trace.traceErrorfn "Errors while formatting all files: %A" result.Messages
147147

148148
let analyze _ =
149-
let analyzerPaths = !! "packages/analyzers/**/analyzers/dotnet/fs"
149+
let analyzerPaths = !!"packages/analyzers/**/analyzers/dotnet/fs"
150150

151151
let createArgsForProject (project: string) analyzerPaths =
152152
let projectName = Path.GetFileNameWithoutExtension project
@@ -162,7 +162,7 @@ let analyze _ =
162162
]
163163
|> String.concat " "
164164

165-
!! "src/**/*.fsproj"
165+
!!"src/**/*.fsproj"
166166
|> Seq.iter (fun fsproj ->
167167
let result =
168168
createArgsForProject fsproj analyzerPaths
@@ -187,7 +187,7 @@ let checkFormatCode _ =
187187

188188

189189
let clean _ =
190-
!! "bin"
190+
!!"bin"
191191
++ "benchmarks/**/bin"
192192
++ "src/**/bin"
193193
++ "tests/**/bin"

src/FsToolkit.ErrorHandling.IcedTasks/CancellableTaskValidationCE.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,8 @@ module AsyncExtensions =
236236
this.ReturnFrom(Async.AwaitCancellableTask t)
237237

238238
member inline this.Bind
239-
([<InlineIfLambda>] t: CancellableTask, [<InlineIfLambda>] binder: (unit -> Async<'U>)) : Async<
240-
'U
241-
>
242-
=
239+
([<InlineIfLambda>] t: CancellableTask, [<InlineIfLambda>] binder: (unit -> Async<'U>))
240+
: Async<'U> =
243241
this.Bind(Async.AwaitCancellableTask t, binder)
244242

245243
member inline this.ReturnFrom([<InlineIfLambda>] t: CancellableTask) : Async<unit> =

src/FsToolkit.ErrorHandling.JobResult/JobResultCE.fs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,8 @@ module JobResultCE =
5858
Job.tryWithDelay computation handler
5959

6060
member inline _.TryFinally
61-
(computation: Job<Result<'T, 'TError>>, [<InlineIfLambda>] compensation: unit -> unit) : Job<
62-
Result<
63-
'T,
64-
'TError
65-
>
66-
>
67-
=
61+
(computation: Job<Result<'T, 'TError>>, [<InlineIfLambda>] compensation: unit -> unit)
62+
: Job<Result<'T, 'TError>> =
6863
Job.tryFinallyFun computation compensation
6964

7065
member inline _.TryFinally

src/FsToolkit.ErrorHandling/AsyncOptionCE.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@ module AsyncOptionCE =
4343
async.TryFinally(computation, compensation)
4444
#if !FABLE_COMPILER
4545
member inline _.TryFinallyAsync
46-
(computation: Async<'value option>, [<InlineIfLambda>] compensation: unit -> ValueTask) : Async<
47-
'value option
48-
>
49-
=
46+
(computation: Async<'value option>, [<InlineIfLambda>] compensation: unit -> ValueTask)
47+
: Async<'value option> =
5048
let compensation =
5149
async {
5250
let vTask = compensation ()

src/FsToolkit.ErrorHandling/AsyncResultCE.fs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,8 @@ module AsyncResultCE =
4646
async.TryWith(computation, handler)
4747

4848
member inline _.TryFinally
49-
(computation: Async<Result<'ok, 'error>>, [<InlineIfLambda>] compensation: unit -> unit) : Async<
50-
Result<
51-
'ok,
52-
'error
53-
>
54-
>
55-
=
49+
(computation: Async<Result<'ok, 'error>>, [<InlineIfLambda>] compensation: unit -> unit)
50+
: Async<Result<'ok, 'error>> =
5651
async.TryFinally(computation, compensation)
5752
#if !FABLE_COMPILER
5853
member inline _.TryFinallyAsync

src/FsToolkit.ErrorHandling/AsyncResultOptionCE.fs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,8 @@ module AsyncResultOptionCE =
8080
#endif
8181

8282
member inline this.While
83-
([<InlineIfLambda>] guard: unit -> bool, computation: AsyncResultOption<unit, 'error>) : AsyncResultOption<
84-
unit,
85-
'error
86-
>
87-
=
83+
([<InlineIfLambda>] guard: unit -> bool, computation: AsyncResultOption<unit, 'error>)
84+
: AsyncResultOption<unit, 'error> =
8885
if guard () then
8986
let mutable whileAsync = Unchecked.defaultof<_>
9087

@@ -152,11 +149,8 @@ module AsyncResultOptionCEExtensions =
152149

153150

154151
member inline this.For
155-
(sequence: #seq<'ok>, [<InlineIfLambda>] binder: 'ok -> AsyncResultOption<unit, 'error>) : AsyncResultOption<
156-
unit,
157-
'error
158-
>
159-
=
152+
(sequence: #seq<'ok>, [<InlineIfLambda>] binder: 'ok -> AsyncResultOption<unit, 'error>)
153+
: AsyncResultOption<unit, 'error> =
160154
this.Using(
161155
sequence.GetEnumerator(),
162156
fun enum ->

src/FsToolkit.ErrorHandling/AsyncValidationCE.fs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ module AsyncValidationCE =
2828
async.Delay generator
2929

3030
member inline this.Combine
31-
(validation1: AsyncValidation<unit, 'error>, validation2: AsyncValidation<'ok, 'error>) : AsyncValidation<
32-
'ok,
33-
'error
34-
>
35-
=
31+
(validation1: AsyncValidation<unit, 'error>, validation2: AsyncValidation<'ok, 'error>)
32+
: AsyncValidation<'ok, 'error> =
3633
this.Bind(validation1, (fun () -> validation2))
3734

3835
member inline _.TryWith
@@ -71,11 +68,8 @@ module AsyncValidationCE =
7168

7269

7370
member inline this.For
74-
(sequence: #seq<'ok>, [<InlineIfLambda>] binder: 'ok -> AsyncValidation<unit, 'error>) : AsyncValidation<
75-
unit,
76-
'error
77-
>
78-
=
71+
(sequence: #seq<'ok>, [<InlineIfLambda>] binder: 'ok -> AsyncValidation<unit, 'error>)
72+
: AsyncValidation<unit, 'error> =
7973
this.Using(
8074
sequence.GetEnumerator(),
8175
fun enum -> this.While(enum.MoveNext, this.Delay(fun () -> binder enum.Current))
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
namespace FsToolkit.ErrorHandling
2+
23
open System
34

45
type ExceptionNull =
5-
#if NET9_0_OR_GREATER && !FABLE_COMPILER
6-
Exception | null
7-
#else
8-
Exception
9-
#endif
6+
#if NET9_0_OR_GREATER && !FABLE_COMPILER
7+
Exception | null
8+
#else
9+
Exception
10+
#endif
1011

1112
type IDisposableNull =
12-
#if NET9_0_OR_GREATER && !FABLE_COMPILER
13-
IDisposable | null
14-
#else
15-
IDisposable
16-
#endif
13+
#if NET9_0_OR_GREATER && !FABLE_COMPILER
14+
IDisposable | null
15+
#else
16+
IDisposable
17+
#endif
1718

1819
type IAsyncDisposableNull =
19-
#if NET9_0_OR_GREATER && !FABLE_COMPILER
20-
IAsyncDisposable | null
21-
#else
22-
IAsyncDisposable
23-
#endif
20+
#if NET9_0_OR_GREATER && !FABLE_COMPILER
21+
IAsyncDisposable | null
22+
#else
23+
IAsyncDisposable
24+
#endif

0 commit comments

Comments
 (0)