FEAT: Use a separate union MaybeUninitCopy for ArrayString

This is the "real" union solution, and ArrayString can use it since its
backing array is Copy. Unfortunately, we'll have to use the Copy bound
on the type, making it "viral" and visible in the user API.
This commit is contained in:
bluss
2018-11-25 12:18:59 +01:00
parent 784ccc97ca
commit c4cd63209f
3 changed files with 128 additions and 39 deletions
+3
View File
@@ -56,7 +56,10 @@ mod maybe_uninit;
#[path="maybe_uninit_nodrop.rs"]
mod maybe_uninit;
mod maybe_uninit_copy;
use maybe_uninit::MaybeUninit;
use maybe_uninit_copy::MaybeUninitCopy;
#[cfg(feature="serde-1")]
use serde::{Serialize, Deserialize, Serializer, Deserializer};