diff options
author | Benno Lossin <[email protected]> | 2023-08-14 08:47:15 +0000 |
---|---|---|
committer | Miguel Ojeda <[email protected]> | 2023-08-21 14:31:49 +0200 |
commit | 9e49439077fe0a9aa062e682193b1f3257b314e2 (patch) | |
tree | 19d5a38c93c2ff2f448435544ab39241521bfa41 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 35e7fca2ff59d9d8f036aba3dcf5c34beb79fdb8 (diff) |
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 <[email protected]>
Reviewed-by: Björn Roy Baron <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Signed-off-by: Benno Lossin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Cleaned a couple trivial nits. ]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions