Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSend and Sync in return type of Error::get_ref #107
Comments
dtolnay
referenced this issue
May 31, 2017
Open
Tracking issue for libz blitz evaluation of reqwest #120
seanmonstar
added
the
easy
label
May 31, 2017
seanmonstar
modified the milestone:
1.0
May 31, 2017
tomprince
referenced this issue
Jun 1, 2017
Merged
Make `Error::get_ref` return a `Send+Sync` error. #132
seanmonstar
closed this
in
#132
Jun 1, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dtolnay commentedMay 31, 2017
reqwest::Error::get_refreturnsOption<&(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 ofstd::io::Error::get_ref.