-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Termios needs a safe constructor #1115
Comments
Replace it with mem::zeroed. It isn't perfect, but it's better than it was. Issue nix-rust#1115
1158: Remove the last use of mem::uninitialized r=asomers a=asomers Replace it with mem::zeroed. It isn't perfect, but it's better than it was. Issue #1115 Co-authored-by: Alan Somers <[email protected]>
Replace it with mem::zeroed. It isn't perfect, but it's better than it was. Issue nix-rust#1115
ping @Susurrus would you have some time to try fixing this? |
Is there anything to fix? #1158 got rid of |
Is all zeros actually a valid state for a |
This is effectively a private function because of the |
Yeah, I agree with making it |
The only constructor method for
Termios
is the unsafe and undocumenteddefault_uninit
. All of the examples use that function. But not only is itunsafe
, it also usesstd::mem::uninitialized
, which will be deprecated in Rust 1.38.0. This will soon be the last remaining use ofstd::mem::uninitialized
.The text was updated successfully, but these errors were encountered: