On Mon Jun 1, 2026 at 11:17 AM BST, 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 <[email protected]>
> Signed-off-by: Andreas Hindborg <[email protected]>

Reviewed-by: Gary Guo <[email protected]>

> ---
> This change was suggested during review of the rust null block series [1].
> 
> [1] https://lore.kernel.org/r/[email protected]
> ---
> Changes in v2:
> - Move `value` into existing impl block (Gary).
> - Add inline attributes (Sashiko).
> - Link to v1: 
> https://msgid.link/[email protected]
> ---
>  rust/kernel/module_param.rs  | 18 +++++++++++++++++-
>  samples/rust/rust_minimal.rs |  2 +-
>  2 files changed, 18 insertions(+), 2 deletions(-)


Reply via email to