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

Send and Sync in return type of Error::get_ref #107

Closed
Tracked by #120
dtolnay opened this issue May 31, 2017 · 0 comments
Closed
Tracked by #120

Send and Sync in return type of Error::get_ref #107

dtolnay opened this issue May 31, 2017 · 0 comments
Labels
E-easy Effort: Easy! Start here :D
Milestone

Comments

@dtolnay
Copy link

dtolnay commented May 31, 2017

reqwest::Error::get_ref returns Option<&(std::error::Error + 'static)>.

In accordance with this API guideline, we like for error types to be Send and Sync. This is less important (or maybe not important) for references to trait objects, but here there doesn't seem to be a reason to want the flexibility of returning a non-Send or -Sync type in the future.

Returning Option<&(std::error::Error + Send + Sync + 'static)> would be consistent with the signature of std::io::Error::get_ref.

@seanmonstar seanmonstar added the E-easy Effort: Easy! Start here :D label May 31, 2017
@seanmonstar seanmonstar modified the milestone: 1.0 May 31, 2017
repi pushed a commit to EmbarkStudios/reqwest that referenced this issue Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Effort: Easy! Start here :D
Projects
None yet
Development

No branches or pull requests

2 participants