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

feat(core): change Result to default error #4535

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

George-Miao
Copy link
Contributor

@George-Miao George-Miao commented Apr 26, 2024

This PR changes Result<T> = std::result::Result<T, Error> to Result<T, E = Error> = std::result::Result<T, E>, makes it easier for user to use even when they have non-opendal errors.

Example

use opendal::Result;

// This still works
let a: Result<T>;

// And this works too
let b: Result<T, MyError>;

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks! I believe we can replace all current std::result::Result changes back to opendal::Result now. Would you like to create an issue for this?

@Xuanwo Xuanwo merged commit 1dcff6c into apache:main Apr 26, 2024
219 of 220 checks passed
@George-Miao
Copy link
Contributor Author

Thanks! I believe we can replace all current std::result::Result changes back to opendal::Result now. Would you like to create an issue for this?

Sure

@George-Miao George-Miao deleted the feat/result-default-error branch April 26, 2024 05:07
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