Skip to content

Commit

Permalink
Remove unused allocation/assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcweber committed Oct 2, 2018
1 parent 9a6e8b2 commit ab2e319
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Rx.NET/Source/src/System.Reactive/EventPatternSourceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ private void Add(Delegate handler, IDisposable disposable)
{
lock (_subscriptions)
{
var l = new Stack<IDisposable>();
if (!_subscriptions.TryGetValue(handler, out l))
if (!_subscriptions.TryGetValue(handler, out var l))
{
_subscriptions[handler] = l = new Stack<IDisposable>();
}
Expand All @@ -118,8 +117,7 @@ protected void Remove(Delegate handler)

lock (_subscriptions)
{
var l = new Stack<IDisposable>();
if (_subscriptions.TryGetValue(handler, out l))
if (_subscriptions.TryGetValue(handler, out var l))
{
d = l.Pop();

Expand Down

0 comments on commit ab2e319

Please sign in to comment.