Skip to content

Commit d859274

Browse files
cmeerenTheAngryByrd
authored andcommitted
Format code
1 parent eed5c0d commit d859274

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

src/FsToolkit.ErrorHandling/AsyncResult.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ module AsyncResult =
132132
Async.bind (Result.either ok ifErrorFunc) input
133133

134134
/// Replaces the wrapped value with unit
135-
let inline ignore<'ok, 'error> (value: Async<Result<'ok, 'error>>) : Async<Result<unit, 'error>> = value |> map ignore<'ok>
135+
let inline ignore<'ok, 'error> (value: Async<Result<'ok, 'error>>) : Async<Result<unit, 'error>> =
136+
value |> map ignore<'ok>
136137

137138
/// Returns the specified error if the async-wrapped value is false.
138139
let inline requireTrue (error: 'error) (value: Async<bool>) : Async<Result<unit, 'error>> =

src/FsToolkit.ErrorHandling/AsyncResultOption.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ module AsyncResultOption =
4545
map2 (fun f x -> f x) applier input
4646

4747
/// Replaces the wrapped value with unit
48-
let ignore<'ok, 'error> (value: Async<Result<'ok option, 'error>>) : Async<Result<unit option, 'error>> = value |> map ignore<'ok>
48+
let ignore<'ok, 'error> (value: Async<Result<'ok option, 'error>>) : Async<Result<unit option, 'error>> =
49+
value |> map ignore<'ok>

tests/FsToolkit.ErrorHandling.JobResult.Tests/JobResult.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,10 @@ let ignoreTests =
231231
|> Expect.hasJobErrorValueSync commonEx
232232

233233
testCase "can call ignore without type parameters"
234-
<| fun _ ->
235-
ignore JobResult.ignore
234+
<| fun _ -> ignore JobResult.ignore
236235

237236
testCase "can call ignore with type parameters"
238-
<| fun _ ->
239-
ignore<Job<Result<int, string>> -> Job<Result<unit, string>>> JobResult.ignore<int, string> ]
237+
<| fun _ -> ignore<Job<Result<int, string>> -> Job<Result<unit, string>>> JobResult.ignore<int, string> ]
240238

241239
let err = "foobar"
242240
let toJob = Job.singleton

tests/FsToolkit.ErrorHandling.JobResult.Tests/JobResultOption.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ let ignoreTests =
167167
<| fun _ -> ignore JobResultOption.ignore
168168

169169
testCase "can call ignore with type parameters"
170-
<| fun _ -> ignore<Job<Result<int option, string>> -> Job<Result<unit option, string>>> JobResultOption.ignore<int, string> ]
170+
<| fun _ ->
171+
ignore<Job<Result<int option, string>> -> Job<Result<unit option, string>>>
172+
JobResultOption.ignore<int, string> ]
171173

172174
[<Tests>]
173175
let computationExpressionTests =

tests/FsToolkit.ErrorHandling.TaskResult.Tests/TaskResultOption.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ let ignoreTests =
167167
<| fun _ -> ignore TaskResultOption.ignore
168168

169169
testCase "can call ignore with type parameters"
170-
<| fun _ -> ignore<Task<Result<int option, string>> -> Task<Result<unit option, string>>> TaskResultOption.ignore<int, string> ]
170+
<| fun _ ->
171+
ignore<Task<Result<int option, string>> -> Task<Result<unit option, string>>>
172+
TaskResultOption.ignore<int, string> ]
171173

172174
[<Tests>]
173175
let computationExpressionTests =

tests/FsToolkit.ErrorHandling.Tests/AsyncResultOption.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ let ignoreTests =
147147
<| fun () -> ignore AsyncResultOption.ignore
148148

149149
testCase "can call ignore with type parameters"
150-
<| fun () -> ignore<Async<Result<int option, string>> -> Async<Result<unit option, string>>> AsyncResultOption.ignore<int, string> ]
150+
<| fun () ->
151+
ignore<Async<Result<int option, string>> -> Async<Result<unit option, string>>>
152+
AsyncResultOption.ignore<int, string> ]
151153

152154
let computationExpressionTests =
153155
testList

0 commit comments

Comments
 (0)