Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
rust
/
crates
/
weak-table
/
e62de8e6798acf87fe33c14aa1e61e228def35c9
/
.
/
src
/
util.rs
blob: 3792ec7432338f458da74e4781652f76fce3b569 [
file
] [
log
] [
blame
]
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
()
}