Re: [PATCH v2] rust: module_param: return value by copy from `value`
From: Petr Pavlu
Date: Thu Jul 09 2026 - 07:51:40 EST
On 6/1/26 12:17 PM, Andreas Hindborg wrote:
> For `Copy` parameter types it is more ergonomic to retrieve the
> parameter value by copy than through a shared reference. Change
> `ModuleParamAccess::value` to return `T` by copy when `T: Copy`,
> and rename the previous reference-returning accessor to
> `value_ref`. Update the in-tree caller in `rust_minimal`.
>
> Suggested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> Signed-off-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
Reviewed-by: Petr Pavlu <petr.pavlu@xxxxxxxx>
@Miguel, please let me know if I should take this patch on modules-next,
or if you'd prefer for it to go through the Rust tree.
--
Thanks,
Petr