Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactors code to reduce technical debt #1543

Merged
merged 3 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,7 @@ public void GetResult()
throw new InvalidOperationException(); // REVIEW: No support for blocking.
}

if (_error != null)
{
_error.Throw();
}
_error?.Throw();
}

public void OnCompleted(Action continuation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,7 @@ private IEnumerator<T> GetEnumeratorCore(int i)
}
finally
{
if (_buffer != null)
{
_buffer.Done(i + 1);
}
_buffer?.Done(i + 1);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,7 @@ private static ReadOnlyCollection<Expression> FixupQuotedArgs(MethodInfo method,
}
}

if (list != null)
{
list.Add(expression);
}
list?.Add(expression);
}

//
Expand Down
5 changes: 1 addition & 4 deletions Ix.NET/Source/System.Linq.Async/System/Linq/Disposables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ public void Dispose()
d1.Dispose();

var d2 = Interlocked.Exchange(ref _d2, null);
if (d2 != null)
{
d2.Dispose();
}
d2?.Dispose();
}
}
}
Expand Down