Hacker News new | ask | show | jobs
by kzrdude 3402 days ago
Would it be any worse to use `File::open("/dev/stdin")` there, so that it is safe code?
1 comments

Oh, that's a good idea. (It's unfortunate that neither my code nor yours is portable to non-Unix platforms like Windows.)

UPDATE: Pushed a commit to my latest PR to replace the unsafe `File::from_raw_fd` with your `File::open`. Thanks!