Skip to content

Commit 011eb13

Browse files
committed
Fixed compiler warning
1 parent dc3194f commit 011eb13

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/DotNext.Threading/Threading/QueuedSynchronizer.DebugSupport.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,13 @@ internal CallerInformationStorage(Func<object> callerInfoProvider)
7272

7373
internal object? Capture()
7474
{
75-
var result = Value;
76-
if (result is null)
75+
if (Value is { } result)
7776
{
78-
result = Activity.Current ?? Trace.CorrelationManager.LogicalOperationStack.Peek();
77+
Value = null;
7978
}
8079
else
8180
{
82-
Value = null;
81+
result = Activity.Current ?? Trace.CorrelationManager.LogicalOperationStack.Peek();
8382
}
8483

8584
return result;

0 commit comments

Comments
 (0)