Skip to content

Conversation

@Standing-Man
Copy link
Contributor

@Standing-Man Standing-Man commented Nov 12, 2025

Which issue does this PR close?

Rationale for this change

The type impl AsRef<str> is implicitly Sized, meaning its size is known at compile time.

&(impl AsRef<str>) is a reference to a concrete type that implements AsRef<str> and is Sized. However, this Sized bound prevents passing references to dynamically sized types such as &str, String, or Box<dyn Trait>.

Therefore, we add + ?Sized to indicate that the referenced type might not have a fixed size — that is, it allows the referenced type to be dynamically sized.

What changes are included in this PR?

  • Enforce lint rule clippy::needless_pass_by_value to datafusion-catalog.

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the catalog Related to the catalog crate label Nov 12, 2025
@Standing-Man Standing-Man changed the title chore: Enforce lint rule clippy::needless_pass_by_value to datafusion-catalog chore: Enforce lint rule clippy::needless_pass_by_value to datafusion-catalog Nov 12, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- thank you @Standing-Man

@Jefffrey Jefffrey added this pull request to the merge queue Nov 13, 2025
Merged via the queue into apache:main with commit 3e2972a Nov 13, 2025
30 checks passed
@Standing-Man
Copy link
Contributor Author

Thanks to all the reviewers for your helpful comments and suggestions!

Please help me review simliar pr #18641 when you have time. @Jefffrey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

catalog Related to the catalog crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce lint rule clippy::needless_pass_by_value to datafusion-catalog

3 participants