4 ms·
blog author here. Thanks for your feedback, I appreciate that! I'm gonna edit the post with it. And don't worry about your code... it's the best crate I've seen
by mbrt 10y ago
blog author here. Thanks for your feedback, I appreciate that! I'm gonna edit the post with it. And don't worry about your code... it's the best crate I've seen so far ;)
By the way, shouldn't msys_tty_on_handle be marked 'unsafe' too? I'm wondering if what happens I pass in some garbage as a handle...
- burntsushi 10y ago> By the way, shouldn't msys_tty_on_handle be marked 'unsafe' too? I'm wondering if what happens I pass in some garbage as a handle... Possibly. How would you construct said garbage? Would it require unsafe?
- mbrt 10y agoI'm not sure, probably yes. It all depends on the winapi crate. If you can get an handle of a different "type" than the expected one, then it's garbage for GetFileInformationByHandleEx. Probably you can't do it without unsafe, so maybe it's fine.