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

code cleanup on Akka.Persistence #5497

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

Aaronontheweb
Copy link
Member

Changes

Cleaning up some of the Eventsourced and AsyncWriteJournal code to use newer C# features - should help improve with compiler optimization in some small areas, but mostly serves to help improve readability.

Cleaning up some of the `Eventsourced` and `AsyncWriteJournal` code to use newer C# features
@@ -354,21 +353,21 @@ private void HandleWriteMessages(WriteMessages message)
writeResult = Task.FromResult((IImmutableList<Exception>)Enumerable.Repeat(e, atomicWriteCount).ToImmutableList());
}

Action<Func<IPersistentRepresentation, Exception, object>, IImmutableList<Exception>> resequence = (mapper, results) =>
void Resequence(Func<IPersistentRepresentation, Exception, object> mapper, IImmutableList<Exception> results)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a local function instead of explicit delegate allocation

Copy link
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit 2896372 into akkadotnet:dev Jan 11, 2022
@Aaronontheweb Aaronontheweb deleted the cleanup/eventsourced branch January 11, 2022 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants