File tree Expand file tree Collapse file tree
src/FSharp.Control.AsyncSeq
tests/FSharp.Control.AsyncSeq.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ module AsyncSeq =
443443 // do! something
444444 //
445445 // because F# translates body as Bind(something, fun () -> Return())
446- member x.Return _ = empty
446+ member x.Return () = empty
447447 member x.YieldFrom ( s : AsyncSeq < 'T >) =
448448 s
449449 member x.Zero () = empty
Original file line number Diff line number Diff line change @@ -90,9 +90,6 @@ module AsyncSeq =
9090 /// also the AsyncSeq.collect function.
9191 member For : source : AsyncSeq < 'T > * action :( 'T -> AsyncSeq < 'TResult >) -> AsyncSeq < 'TResult >
9292
93- /// Implements "return " for the asyncSeq computation builder.
94- member Return : 'unit -> AsyncSeq < 'T >
95-
9693 /// Implements "try - finally " for the asyncSeq computation builder.
9794 member TryFinally : body : AsyncSeq < 'T > * compensation :( unit -> unit ) -> AsyncSeq < 'T >
9895
Original file line number Diff line number Diff line change @@ -1710,7 +1710,9 @@ let ``AsyncSeq.ofAsyncEnum should roundtrip successfully``() =
17101710let ``AsyncSeq.toAsyncEnum raises exception`` () : unit =
17111711 async {
17121712 let exceptionMessage = " Raised inside AsyncSeq"
1713- let exceptionSequence = asyncSeq { yield failwith exceptionMessage; yield 1 } |> AsyncSeq.toAsyncEnum
1713+ let exceptionSequence =
1714+ asyncSeq { yield failwith exceptionMessage; yield 1 }
1715+ |> AsyncSeq.toAsyncEnum
17141716 let mutable exceptionRaised = false
17151717 try
17161718 let enumerator = exceptionSequence.GetAsyncEnumerator()
@@ -1729,7 +1731,10 @@ let ``AsyncSeq.toAsyncEnum raises exception``() : unit =
17291731let ``AsyncSeq.ofAsyncEnum raises exception`` () : unit =
17301732 async {
17311733 let exceptionMessage = " Raised inside AsyncSeq"
1732- let exceptionSequence = asyncSeq { return failwith exceptionMessage; yield 1 } |> AsyncSeq.toAsyncEnum |> AsyncSeq.ofAsyncEnum
1734+ let exceptionSequence =
1735+ asyncSeq { yield failwith exceptionMessage; yield 1 }
1736+ |> AsyncSeq.toAsyncEnum
1737+ |> AsyncSeq.ofAsyncEnum
17331738 let mutable exceptionRaised = false
17341739 try
17351740 let enumerator = exceptionSequence.GetEnumerator()
You can’t perform that action at this time.
0 commit comments