diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2021-04-04 10:34:13 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2021-04-04 10:34:13 +0200 |
commit | 3f9b450c63b8876a2925268f08ad34c97a0bc16d (patch) | |
tree | 22edda3ebcadc3639100a10bf66e6e4d814ec304 | |
parent | 656062131be9a7cd314bbc6c165edad850afead2 (diff) | |
download | nihav-player-3f9b450c63b8876a2925268f08ad34c97a0bc16d.tar.gz |
update for rustc 1.46
-rw-r--r-- | sndplay/src/command.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sndplay/src/command.rs b/sndplay/src/command.rs index 3f5ecde..b706b9a 100644 --- a/sndplay/src/command.rs +++ b/sndplay/src/command.rs @@ -26,7 +26,7 @@ pub struct CmdLineState { } impl CmdLineState { pub fn new() -> Self { - let mut orig_state: termios = unsafe { std::mem::uninitialized() }; + let mut orig_state: termios = unsafe { std::mem::MaybeUninit::uninit().assume_init() }; unsafe { tcgetattr(0, &mut orig_state); } let mut new_state = orig_state; new_state.c_lflag &= !(libc::ECHO | libc::ICANON); @@ -34,7 +34,7 @@ impl CmdLineState { Self { orig_state } } pub fn new_normal() -> Self { - let mut orig_state: termios = unsafe { std::mem::uninitialized() }; + let mut orig_state: termios = unsafe { std::mem::MaybeUninit::uninit().assume_init() }; unsafe { tcgetattr(0, &mut orig_state); } let mut new_state = orig_state; new_state.c_lflag |= libc::ECHO | libc::ICANON; |