Sign in
android
/
platform
/
external
/
rust
/
crates
/
weak-table
/
refs/heads/android15-tests-dev
/
.
/
src
/
util.rs
blob: 9affd7fc12f185271b6606ea5d0c0a9219d7b5ff [
file
] [
log
] [
blame
] [
edit
]
use
crate
::
compat
::*;
pub
fn
new_boxed_option_slice
<
T
>(
size
:
usize
)
->
Box
<[
Option
<
T
>]>
{
let
mut
vector
=
Vec
::
with_capacity
(
size
);
for
_ in
0
..
size
{
vector
.
push
(
None
)
}
vector
.
into_boxed_slice
()
}