Skip to content

Commit 298ae28

Browse files
committed
Fix FS3264 in ValueTaskOptionCE.fs
1 parent 8d05b66 commit 298ae28

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/FsToolkit.ErrorHandling/TaskValueOptionCE.fs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,11 @@ type TaskValueOptionBuilder() =
237237
if step then
238238
sm.Data.SetResult()
239239
else
240-
let mutable awaiter =
241-
sm.ResumptionDynamicInfo.ResumptionData
242-
:?> ICriticalNotifyCompletion
243-
244-
// assert not (isNull awaiter)
245-
sm.Data.MethodBuilder.AwaitUnsafeOnCompleted(&awaiter, &sm)
240+
match sm.ResumptionDynamicInfo.ResumptionData with
241+
| :? ICriticalNotifyCompletion as awaiter ->
242+
let mutable awaiter = awaiter
243+
sm.Data.MethodBuilder.AwaitUnsafeOnCompleted(&awaiter, &sm)
244+
| awaiter -> assert not (isNull awaiter)
246245

247246
with exn ->
248247
savedExn <- exn

0 commit comments

Comments
 (0)