From 8502c031f88453ca9ea81253906ee9944b053b3c Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 4 Jan 2020 17:26:26 -0800 Subject: [PATCH] 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 --- README.md | 2 +- appveyor.yml | 2 +- src/ecs/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 908b2c9..6679e44 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ The Visual Studio 2017 Redistributable is required to run these builds. ## 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: ```bash diff --git a/appveyor.yml b/appveyor.yml index 1295021..994ed6d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,7 +21,7 @@ build_script: 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\" diff --git a/src/ecs/mod.rs b/src/ecs/mod.rs index e63c4a9..2fa3fd5 100644 --- a/src/ecs/mod.rs +++ b/src/ecs/mod.rs @@ -481,7 +481,7 @@ impl ComponentMem { component_size: mem::size_of::(), drop_func: Box::new(|data| { 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); mem::drop(val); }