From 05d1f303d23ccce9fb4968f52272ef8b0731644d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Haudebourg?= Date: Sun, 13 Sep 2020 18:27:05 +0200 Subject: [PATCH] Use `MaybeUninit::assume_init_read`. This method has been renamed from `MaybeUninit::read`. Fixes issue #42. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e309226..e3d6b27 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1768,7 +1768,7 @@ impl StaticVec { // Set the length of `self` to 0 to prevent double-drops. self.length = 0; // Read out the contents of `data`. - unsafe { Ok(self.data.read()) } + unsafe { Ok(self.data.assume_init_read()) } } }