Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Make HStdout and HStderr Copy. #40

Merged
merged 1 commit into from
Aug 22, 2019

Conversation

m-ou-se
Copy link
Contributor

@m-ou-se m-ou-se commented Aug 21, 2019

This makes it possible to pass it around by value, use a Cell<HStdout>, etc.

@m-ou-se m-ou-se requested a review from a team as a code owner August 21, 2019 16:47
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @adamgreig (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. Due to 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 the contribution instructions for more information.

@m-ou-se
Copy link
Contributor Author

m-ou-se commented Aug 21, 2019

This only makes sense because the crate doesn't close() the streams. Do we want to implement calling close() on drop at some point? If so, this shouldn't be merged.

@adamgreig
Copy link
Member

I don't see why we'd need to call close(), and anyway if we do it just means the writes on the other instances will start failing with errors, which isn't unsafe. Personally I'm in favour of this PR but I'll give other @rust-embedded/cortex-m people a chance to chime in since it's a bit of a semantic change.

Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

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

If no one else has comments let's get this merged. Thanks!

bors r+

bors bot added a commit that referenced this pull request Aug 22, 2019
40: Make HStdout and HStderr Copy. r=adamgreig a=m-ou-se

This makes it possible to pass it around by value, use a `Cell<HStdout>`, etc.

Co-authored-by: Mara Bos <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 22, 2019

Build succeeded

@bors bors bot merged commit 02341d7 into rust-embedded:master Aug 22, 2019
@m-ou-se m-ou-se deleted the patch-1 branch August 23, 2019 08:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants