diff options
| author | Ralf Jung <post@ralfj.de> | 2019-07-19 10:44:11 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-07-19 14:47:56 +0200 |
| commit | e074db764a0f25af073cb3f472d39a86e6fa7f39 (patch) | |
| tree | 6d0263f84567761ea6e65dd81f1c92bd9e7299e3 /src/liballoc/collections | |
| parent | fe499a7b34dcb1fc054dd637ea561a19a268d2de (diff) | |
| download | rust-e074db764a0f25af073cb3f472d39a86e6fa7f39.tar.gz rust-e074db764a0f25af073cb3f472d39a86e6fa7f39.zip | |
use const array repeat expressions for uninit_array
Diffstat (limited to 'src/liballoc/collections')
| -rw-r--r-- | src/liballoc/collections/btree/node.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index 7cf077d61d6..e067096f0c7 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -106,8 +106,8 @@ impl<K, V> LeafNode<K, V> { LeafNode { // As a general policy, we leave fields uninitialized if they can be, as this should // be both slightly faster and easier to track in Valgrind. - keys: uninitialized_array![_; CAPACITY], - vals: uninitialized_array![_; CAPACITY], + keys: uninit_array![_; CAPACITY], + vals: uninit_array![_; CAPACITY], parent: ptr::null(), parent_idx: MaybeUninit::uninit(), len: 0 @@ -159,7 +159,7 @@ impl<K, V> InternalNode<K, V> { unsafe fn new() -> Self { InternalNode { data: LeafNode::new(), - edges: uninitialized_array![_; 2*B], + edges: uninit_array![_; 2*B], } } } |
