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

println! panics when piped into something that closes stdin early #50142

Closed
P-E-Meunier opened this issue Apr 21, 2018 · 3 comments
Closed

println! panics when piped into something that closes stdin early #50142

P-E-Meunier opened this issue Apr 21, 2018 · 3 comments

Comments

@P-E-Meunier
Copy link

After code using println! starts working, I don't think rustaceans should have to rewrite their code using finer error control.

println!("Hello, world") should not cause a panic when piped into anything. I believe the default behaviour should be to ignore errors, people wanting finer error control can still writeln! to stdout.

@varkor
Copy link
Member

varkor commented Apr 21, 2018

I think the panicking behaviour is undesirable too, but if it's something you want control over now, you can use the try_print crate, which should do what you want.

@sfackler
Copy link
Member

Duplicate of #46016.

@P-E-Meunier
Copy link
Author

@sfackler: thanks! I couldn't find it, sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants