Update to Rust 1.40.0. Closes #253

* Update mem::uninitialized to MaybeUninit

* Update to Rust version 1.40 in AppVeyor

* Update readme for Rust version requirement
This commit is contained in:
ice_iix 2020-01-04 17:26:26 -08:00
parent afa100313c
commit 8502c031f8
3 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ The Visual Studio 2017 Redistributable is required to run these builds.
## Building ## Building
Requires Rust stable version 1.38.0 or newer to build. Requires Rust stable version 1.40.0 or newer to build.
Compile and run: Compile and run:
```bash ```bash

View File

@ -21,7 +21,7 @@ build_script:
appveyor AddMessage "Platform rust: %RUST_INSTALL%" appveyor AddMessage "Platform rust: %RUST_INSTALL%"
appveyor DownloadFile "https://static.rust-lang.org/dist/rust-1.38.0-%RUST_INSTALL%.exe" -FileName rust-install.exe appveyor DownloadFile "https://static.rust-lang.org/dist/rust-1.40.0-%RUST_INSTALL%.exe" -FileName rust-install.exe
"./rust-install.exe" /VERYSILENT /NORESTART /DIR="C:\Rust\" "./rust-install.exe" /VERYSILENT /NORESTART /DIR="C:\Rust\"

View File

@ -481,7 +481,7 @@ impl ComponentMem {
component_size: mem::size_of::<T>(), component_size: mem::size_of::<T>(),
drop_func: Box::new(|data| { drop_func: Box::new(|data| {
unsafe { unsafe {
let mut val: T = mem::uninitialized(); let mut val: T = mem::MaybeUninit::uninit().assume_init();
ptr::copy(data as *mut T, &mut val, 1); ptr::copy(data as *mut T, &mut val, 1);
mem::drop(val); mem::drop(val);
} }