Skip to content

options3 ref vs & #2029

Closed Answered by mo8it
eyyyyyyy3 asked this question in Q&A
Oct 14, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

What do you mean with "more preferred"? Is it because the compiler suggests it?

Personally, I prefer the second solution with & over ref. ref is rarely used in the Rust code that I read until now.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@eyyyyyyy3
Comment options

Answer selected by mo8it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1720 on July 07, 2024 12:17.