-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Akka.Util: improve Result<T>
#7520
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
Akka.Util: improve Result<T>
#7520
Conversation
public static Akka.Util.Result<T> From<T>(System.Func<T> func) { } | ||
public static Akka.Util.Result<T> FromTask<T>(System.Threading.Tasks.Task<T> task) { } | ||
public static Akka.Util.Result<T> Success<T>(T value) { } | ||
[return: System.Runtime.CompilerServices.NullableAttribute(new byte[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API change - make fields into nullable properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reverted back to using fields here instead of properties, out of an abundance of caution WRT binary compatibility |
Changes
Designed to support our work on #7518
Makes the following changes to
Result<T>
:struct
to be areadonly record struct
so it an automatically benefit from equality by value and other compiler optimizationsChecklist
For significant changes, please ensure that the following have been completed (delete if not relevant):