Skip to content

Replace &Option<T> with Option<&T>. #4424

@HaoYang670

Description

@HaoYang670

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Actually, I file this issue because I just remember we've ever done the same thing in arrow-rs: apache/arrow-rs#1556
And I find a discussion about the trade-off between &Option<T> and Option<&T>: https://www.reddit.com/r/rust/comments/wqsxk2/is_it_better_to_pass_optiont_or_optiont/

Describe the solution you'd like
A clear and concise description of what you want to happen.
It isn't the goal to replace all the occurrences of &Option<_>, but to do the replacement if we can benefit from it.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
We could not do this

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions