-
Notifications
You must be signed in to change notification settings - Fork 10
[Android] Remove com.github.michaelbull #473
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
Changes from all commits
9d9ff62
540513a
e643695
be8ea6d
9743f8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,26 @@ package io.bitdrift.capture | |
| /** | ||
| * A monad for modeling success or failure operations in the Capture SDK. | ||
| */ | ||
| typealias CaptureResult<V> = com.github.michaelbull.result.Result<V, Error> | ||
| sealed class CaptureResult<out V> { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since refactoring this will touch all existing references, why
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually i thought about it, but wanted to minimize noise to existing customer that rely on CaptureResult
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, I didn't realize this class/alias was public
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should take a look at the library we used, it can be helpful as a reference implementation for things like this:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not saying we have to do it that way but it's a neat property of the library
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup very neat indeed |
||
| /** | ||
| * Represents a successful operation result within the Capture SDK. | ||
| * | ||
| * @param V the type of value returned upon success. | ||
| * @property value the result value produced by the operation. | ||
| */ | ||
| data class Success<V>( | ||
| val value: V, | ||
| ) : CaptureResult<V>() | ||
|
|
||
| /** | ||
| * Represents a failed operation result within the Capture SDK. | ||
| * | ||
| * @property error the [Error] describing the reason for the failure. | ||
| */ | ||
| data class Failure( | ||
| val error: Error, | ||
| ) : CaptureResult<Nothing>() | ||
FranAguilera marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /** | ||
| * Represents a failed operation in the Capture SDK. | ||
|
|
||
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.
ok so it looks like all things being equal this is the only nice method we lost (map), which doesn't sound like the end of the world to me