Skip to content

Commit c822449

Browse files
authored
Remove unused locals in System.Runtime.WindowsRuntime (#33035)
1 parent 2898e1e commit c822449

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/WindowsRuntimeSynchronizationContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public override void Post(SendOrPostCallback d, object state)
118118
if (d == null)
119119
throw new ArgumentNullException(nameof(d));
120120

121-
var ignored = _dispatcher.RunAsync(CoreDispatcherPriority.Normal, new Invoker(d, state).Invoke);
121+
_ = _dispatcher.RunAsync(CoreDispatcherPriority.Normal, new Invoker(d, state).Invoke);
122122
}
123123

124124
public override SynchronizationContext CreateCopy()
@@ -143,7 +143,7 @@ public override void Post(SendOrPostCallback d, object state)
143143
// We explicitly choose to ignore the return value here. This enqueue operation might fail if the
144144
// dispatcher queue was shut down before we got here. In that case, we choose to just move on and
145145
// pretend nothing happened.
146-
var ignored = _dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Normal, new Invoker(d, state).Invoke);
146+
_ = _dispatcherQueue.TryEnqueue(DispatcherQueuePriority.Normal, new Invoker(d, state).Invoke);
147147
}
148148

149149
public override SynchronizationContext CreateCopy()

0 commit comments

Comments
 (0)