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
dtolnay opened this Issue May 31, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.