Skip to content

Commit 3806465

Browse files
author
Oren (electricessence)
committed
Better nullable coverage.
1 parent d8d3727 commit 3806465

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Open.ChannelExtensions/Extensions.Filter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public override bool TryRead(out T item)
2929
return true;
3030
}
3131

32+
#pragma warning disable CS8653 // A default expression introduces a null value for a type parameter.
3233
item = default;
34+
#pragma warning restore CS8653 // A default expression introduces a null value for a type parameter.
3335
return false;
3436
}
3537

Open.ChannelExtensions/Extensions._.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static ValueTask WaitToWriteAndThrowIfClosedAsync<T>(this ChannelWriter<T
7171
/// <typeparam name="TRead">The type being read from the reader.</typeparam>
7272
/// <typeparam name="Exception">The optional exception to include with completion.</typeparam>
7373
/// <returns>The reader's completion task.</returns>
74-
public static Task CompleteAsync<TWrite, TRead>(this Channel<TWrite, TRead> channel, Exception exception = null)
74+
public static Task CompleteAsync<TWrite, TRead>(this Channel<TWrite, TRead> channel, Exception? exception = null)
7575
{
7676
channel.Writer.Complete(exception);
7777
return channel.Reader.Completion;

0 commit comments

Comments
 (0)