diff options
| author | bors <bors@rust-lang.org> | 2025-01-12 14:43:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-01-12 14:43:10 +0000 |
| commit | 7bb98889534d597911263d647424557b414770ec (patch) | |
| tree | f07a9619e2f42f2f02986545339f5a4901b9c5e0 /library/alloc/src | |
| parent | c0f6a1ce3f89a3240efe5c83839675e20f84e001 (diff) | |
| parent | 2fd11d00422558760dad51406d9edafca5cd4e54 (diff) | |
| download | rust-7bb98889534d597911263d647424557b414770ec.tar.gz rust-7bb98889534d597911263d647424557b414770ec.zip | |
Auto merge of #135402 - matthiaskrgr:rollup-cz7hs13, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #129259 (Add inherent versions of MaybeUninit methods for slices) - #135374 (Suggest typo fix when trait path expression is typo'ed) - #135377 (Make MIR cleanup for functions with impossible predicates into a real MIR pass) - #135378 (Remove a bunch of diagnostic stashing that doesn't do anything) - #135397 (compiletest: add erroneous variant to `string_enum`s conversions error) - #135398 (add more crash tests) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/btree/node.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/alloc/src/collections/btree/node.rs b/library/alloc/src/collections/btree/node.rs index 0c93eff0d20..4057657632b 100644 --- a/library/alloc/src/collections/btree/node.rs +++ b/library/alloc/src/collections/btree/node.rs @@ -383,9 +383,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Immut<'a>, K, V, Type> { /// Borrows a view into the keys stored in the node. pub fn keys(&self) -> &[K] { let leaf = self.into_leaf(); - unsafe { - MaybeUninit::slice_assume_init_ref(leaf.keys.get_unchecked(..usize::from(leaf.len))) - } + unsafe { leaf.keys.get_unchecked(..usize::from(leaf.len)).assume_init_ref() } } } |
