diff options
author | Benno Lossin <benno.lossin@proton.me> | 2023-08-14 11:47:15 +0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2023-08-21 15:31:49 +0300 |
commit | 9e49439077fe0a9aa062e682193b1f3257b314e2 (patch) | |
tree | 19d5a38c93c2ff2f448435544ab39241521bfa41 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 35e7fca2ff59d9d8f036aba3dcf5c34beb79fdb8 (diff) | |
download | linux-9e49439077fe0a9aa062e682193b1f3257b314e2.tar.xz |
rust: init: add functions to create array initializers
Add two functions `pin_init_array_from_fn` and `init_array_from_fn` that
take a function that generates initializers for `T` from `usize`, the added
functions then return an initializer for `[T; N]` where every element is
initialized by an element returned from the generator function.
Suggested-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20230814084602.25699-9-benno.lossin@proton.me
[ Cleaned a couple trivial nits. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions