Closed rhysd closed 5 years ago
I have addressed the review comment at 8edc0474dd4d27b0af055feefb583794dad4b3f2. Instead of uninitialized()
, it wraps GetConsoleScreenBufferInfo()
as get_console_screen_buffer_info()
. After getting uninitialized memory, it immediately initializes the buffer with GetConsoleScreenBufferInfo()
. So the returned buffer is guaranteed to be initialized and there is no undefined behavior.
(I apologize many force pushes. I don't have Windows machine so I needed to check Appveyor result instead)
Ahh, ok, I misunderstood the semantics of MaybeUninit
. Thank you for the point.
I fixed my patch again at 3e9624f and added a new small test for get_console_screen_buffer_info()
at 65801a0.
Thank you for correcting me and helping to understand correctly.
I noticed that CI fails since this crate is using deprecated
std::mem::uninitialized()
.https://ci.appveyor.com/project/Stebalien/term/builds/26853323/job/880r4cnu5lhfaccv
This PR uses
MaybeUninit
which replacesstd::mem::uninitialized()
using a compiler version switch provided byrustversion
crate.