(Possibly) confusing message in ptr_arg #6964
Labels
good first issue
These issues are a good way to get started with Clippy
L-suggestion
Lint: Improving, adding or fixing lint suggestions
ptr_arg prints the message:
warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices
I was confused for a while about the "one more reference", as switching does not seem to remove any references.
After some thought, is this referring to the internal implementation of Vec requiring another indirection? In that case, perhaps replace "involves one more reference" with "may produce slower code", or something like that?
The text was updated successfully, but these errors were encountered: