Skip to content

Commit 5ced806

Browse files
committed
formatting pass
1 parent a4379fe commit 5ced806

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ set -o pipefail
77
echo "Restoring dotnet tools..."
88
dotnet tool restore
99

10-
FAKE_DETAILED_ERRORS=true dotnet fake build -t "$@"
10+
FAKE_DETAILED_ERRORS=true PAKET_SKIP_RESTORE_TARGETS=true dotnet fake build -t "$@"

src/FsToolkit.ErrorHandling/Result.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ module Result =
214214
| Error err -> return Error err
215215
}
216216

217-
///
218-
let traverseAsync (f: 't -> Async<'u>) (res: Result<'t, 'e>): Async<Result<'u, 'e>> =
217+
///
218+
let traverseAsync (f: 't -> Async<'u>) (res: Result<'t, 'e>) : Async<Result<'u, 'e>> =
219219
((Result.map f) >> sequenceAsync) res
220220

221221
/// Returns the Ok value or runs the specified function over the error value.

tests/FsToolkit.ErrorHandling.Tests/Result.fs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -683,21 +683,23 @@ let sequenceAsyncTests =
683683
} ]
684684

685685
let traverseAsyncTests =
686-
testList "traverseAsync Tests" [
687-
testCaseAsync "traverseAsync returns the async value if Ok" <| async {
688-
let resAsnc = async { return "foo" } |> Ok
689-
let resFunc = id
690-
let! value = (resFunc, resAsnc) ||> Result.traverseAsync
691-
Expect.equal value (Ok "foo") ""
692-
}
693-
694-
testCaseAsync "traverseAsync returns the error value if Error" <| async {
695-
let resAsnc = Error "foo"
696-
let resFunc = id
697-
let! value = (resFunc, resAsnc) ||> Result.traverseAsync
698-
Expect.equal value (Error "foo") ""
699-
}
700-
]
686+
testList
687+
"traverseAsync Tests"
688+
[ testCaseAsync "traverseAsync returns the async value if Ok"
689+
<| async {
690+
let resAsnc = async { return "foo" } |> Ok
691+
let resFunc = id
692+
let! value = (resFunc, resAsnc) ||> Result.traverseAsync
693+
Expect.equal value (Ok "foo") ""
694+
}
695+
696+
testCaseAsync "traverseAsync returns the error value if Error"
697+
<| async {
698+
let resAsnc = Error "foo"
699+
let resFunc = id
700+
let! value = (resFunc, resAsnc) ||> Result.traverseAsync
701+
Expect.equal value (Error "foo") ""
702+
} ]
701703

702704
let valueOrTests =
703705
testList

0 commit comments

Comments
 (0)