Mercurial > touhou
diff examples/eclrenderer.rs @ 743:0fed350d1778
examples: Remove deprecated std::mem::uninitialized().
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 07 Jan 2020 12:34:11 +0100 |
parents | 0a250ddfae79 |
children | 5e5e7136ac92 |
line wrap: on
line diff
--- a/examples/eclrenderer.rs +++ b/examples/eclrenderer.rs @@ -128,7 +128,10 @@ fn main() { let mut ecl_runner = EclRunner::new(&ecl, enemy.clone(), sub); assert_eq!(std::mem::size_of::<Vertex>(), std::mem::size_of::<FakeVertex>()); - let vertices: [Vertex; 4] = unsafe { std::mem::uninitialized() }; + let vertices: [Vertex; 4] = { + let data = std::mem::MaybeUninit::uninit(); + unsafe { data.assume_init() } + }; let mut surface = GlfwSurface::new(WindowDim::Windowed(384, 448), "Touhou", WindowOpt::default()).unwrap();