projects
/
nihav-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6560621
)
update for rustc 1.46
author
Kostya Shishkov
<kostya.shishkov@gmail.com>
Sun, 4 Apr 2021 08:34:13 +0000
(10:34 +0200)
committer
Kostya Shishkov
<kostya.shishkov@gmail.com>
Sun, 4 Apr 2021 08:34:13 +0000
(10:34 +0200)
sndplay/src/command.rs
patch
|
blob
|
blame
|
history
diff --git
a/sndplay/src/command.rs
b/sndplay/src/command.rs
index 3f5ecdeb3cdebbb48161c268da4eb2b1df4740a2..b706b9a2f05f9ec9787b6f8e97de1b0a37a24fd7 100644
(file)
--- a/
sndplay/src/command.rs
+++ b/
sndplay/src/command.rs
@@
-26,7
+26,7
@@
pub struct CmdLineState {
}
impl CmdLineState {
pub fn new() -> Self {
}
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);
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 {
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;
unsafe { tcgetattr(0, &mut orig_state); }
let mut new_state = orig_state;
new_state.c_lflag |= libc::ECHO | libc::ICANON;