Skip to content

Commit 276bc28

Browse files
authored
add explicit type param to ignore (#300)
* add explicit type param to ignore * add explicit type param to Option.ignore
1 parent 519f968 commit 276bc28

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/FsToolkit.ErrorHandling/Option.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module Option =
8383
/// </summary>
8484
/// <param name="opt">The option to ignore.</param>
8585
/// <returns>A unit option.</returns>
86-
let inline ignore (opt: 'T option) : unit option =
86+
let inline ignore<'T> (opt: 'T option) : unit option =
8787
match opt with
8888
| Some _ -> Some()
8989
| None -> None

src/FsToolkit.ErrorHandling/Task.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ module Task =
4444
let inline map3 ([<InlineIfLambda>] f) x y z = apply (map2 f x y) z
4545

4646
/// Allows us to call `do!` syntax inside a computation expression
47-
let inline ignore (x: Task<'a>) =
47+
let inline ignore<'a> (x: Task<'a>) =
4848
x
4949
|> map ignore
5050

51+
5152
/// Takes two tasks and returns a tuple of the pair
5253
let zip (a1: Task<_>) (a2: Task<_>) =
5354
task {

0 commit comments

Comments
 (0)