Skip to content

Commit 3fcbd02

Browse files
2010YOUY01alamb
andauthored
minor: enforce clippy::needless_pass_by_value for crates that don't require code changes. (#18586)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> Part of #18503 ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> Enforce the lint rule to all crates that are already passing this extra check, and we don't need further code change on them. ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> Co-authored-by: Andrew Lamb <[email protected]>
1 parent e406689 commit 3fcbd02

File tree

13 files changed

+43
-2
lines changed

13 files changed

+43
-2
lines changed

datafusion/catalog-listing/src/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
#![doc(
1922
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
2023
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"

datafusion/common-runtime/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
#![doc(
1922
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
2023
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"

datafusion/datasource-arrow/src/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
//! [`ArrowFormat`]: Apache Arrow file format abstractions
19-
18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
2021
// Make sure fast / cheap clones on Arc are explicit:
2122
// https://github.com/apache/datafusion/issues/11143
2223
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
2324

25+
//! [`ArrowFormat`]: Apache Arrow file format abstractions
26+
2427
pub mod file_format;
2528
pub mod source;
2629

datafusion/datasource-csv/src/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
// Make sure fast / cheap clones on Arc are explicit:
1922
// https://github.com/apache/datafusion/issues/11143
2023
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]

datafusion/datasource-json/src/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
// Make sure fast / cheap clones on Arc are explicit:
1922
// https://github.com/apache/datafusion/issues/11143
2023
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]

datafusion/doc/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
#![doc(
1922
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
2023
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"

datafusion/functions-table/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
#![doc(
1922
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
2023
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"

datafusion/functions-window-common/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
#![doc(
1922
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
2023
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"

datafusion/physical-expr-adapter/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
#![doc(
1922
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
2023
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"

datafusion/proto-common/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
// https://github.com/apache/datafusion/issues/18503
19+
#![deny(clippy::needless_pass_by_value)]
20+
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
1821
#![doc(
1922
html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
2023
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"

0 commit comments

Comments
 (0)