-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Adding unsafe Send trait implementation for RingBuf #20326
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
@@ -49,6 +49,9 @@ pub struct RingBuf<T> { | |||
} | |||
|
|||
#[stable] | |||
unsafe impl<T: Send> Send for RingBuf<T> { |
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.
The convention is to have the whole impl on the same line, including the last }
.
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.
yes, new commit has impl in same line for both Send and Sync.
Thanks! Could you also add the same sort of implementation for |
Added support for Sync as well. |
Looks good! Could you squash the two commits? |
(just for the future) we may also want to try to use |
When I submitted a PR rust-lang#20326, mistakenly was committed using my work email. Correct the email address. NOTE: Steve klabnik has updated email address in http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html
fixes #20322