Skip to content

Commit 5e11d18

Browse files
committed
* Accept suggestion by @lechu445
1 parent d0f3df8 commit 5e11d18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/RabbitMQ.Client/client/impl/RpcContinuationQueue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void Dispose()
8181
public void Enqueue(IRpcContinuation k)
8282
{
8383
IRpcContinuation result = Interlocked.CompareExchange(ref _outstandingRpc, k, s_tmp);
84-
if (!(result is EmptyRpcContinuation))
84+
if (result is not EmptyRpcContinuation)
8585
{
8686
throw new NotSupportedException($"Pipelining of requests forbidden (attempted: {k.GetType()}, enqueued: {result.GetType()})");
8787
}
@@ -123,7 +123,7 @@ public IRpcContinuation Next()
123123
/// waiting continuations.
124124
///</para>
125125
///</remarks>
126-
public bool TryPeek<T>([MaybeNullWhen(false)] out T continuation) where T : IRpcContinuation
126+
public bool TryPeek<T>([NotNullWhen(true)] out T? continuation) where T : class, IRpcContinuation
127127
{
128128
if (_outstandingRpc is T result)
129129
{

0 commit comments

Comments
 (0)