From 639fda3d18ca311d7bfa17e6b4289c9c02edf81d Mon Sep 17 00:00:00 2001 From: comphead Date: Wed, 21 Aug 2024 09:55:07 -0700 Subject: [PATCH] feat: Enable `clippy::clone_on_ref_ptr` on `proto` and `spark_exprs` crates --- native/proto/src/lib.rs | 2 ++ native/spark-expr/src/lib.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/native/proto/src/lib.rs b/native/proto/src/lib.rs index 44101965d..266bf62db 100644 --- a/native/proto/src/lib.rs +++ b/native/proto/src/lib.rs @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +// The clippy throws an error if the reference clone not wrapped into `Arc::clone` +// The lint makes easier for code reader/reviewer separate references clones from more heavyweight ones #![deny(clippy::clone_on_ref_ptr)] // Include generated modules from .proto files. diff --git a/native/spark-expr/src/lib.rs b/native/spark-expr/src/lib.rs index 1b1ddbe91..9fb16f94d 100644 --- a/native/spark-expr/src/lib.rs +++ b/native/spark-expr/src/lib.rs @@ -14,6 +14,9 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. + +// The clippy throws an error if the reference clone not wrapped into `Arc::clone` +// The lint makes easier for code reader/reviewer separate references clones from more heavyweight ones #![deny(clippy::clone_on_ref_ptr)] mod cast;