about summary refs log tree commit diff
path: root/src/libcore/fmt
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-07-19 17:23:47 +0200
committerRalf Jung <post@ralfj.de>2019-07-19 17:23:47 +0200
commitad261f6852c928d3ce0a6dd34ec6c3a38792e4de (patch)
treed9b96b6ec6dc4b21b9dd0a97b7ccb07630a7e592 /src/libcore/fmt
parente074db764a0f25af073cb3f472d39a86e6fa7f39 (diff)
avoid uninit_array! macro where it is not needed
Diffstat (limited to 'src/libcore/fmt')
-rw-r--r--src/libcore/fmt/num.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/fmt/num.rs b/src/libcore/fmt/num.rs
index e2d00e654dd..3b5c9fbff25 100644
--- a/src/libcore/fmt/num.rs
+++ b/src/libcore/fmt/num.rs
@@ -51,7 +51,7 @@ trait GenericRadix {
         // characters for a base 2 number.
         let zero = T::zero();
         let is_nonnegative = x >= zero;
-        let mut buf = uninit_array![u8; 128];
+        let mut buf = [MaybeUninit::<u8>::uninit(); 128];
         let mut curr = buf.len();
         let base = T::from_u8(Self::BASE);
         if is_nonnegative {
@@ -189,7 +189,7 @@ static DEC_DIGITS_LUT: &[u8; 200] =
 macro_rules! impl_Display {
     ($($t:ident),* as $u:ident via $conv_fn:ident named $name:ident) => {
         fn $name(mut n: $u, is_nonnegative: bool, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-            let mut buf = uninit_array![u8; 39];
+            let mut buf = [MaybeUninit::<u8>::uninit(); 39];
             let mut curr = buf.len() as isize;
             let buf_ptr = MaybeUninit::first_ptr_mut(&mut buf);
             let lut_ptr = DEC_DIGITS_LUT.as_ptr();