From e21c686cdc82ca07d77570c29a8a110040136c5c Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Thu, 24 Aug 2023 17:46:17 +0100 Subject: [PATCH] Fixes for clippy 1.72. (#587) --- candle-core/src/dtype.rs | 1 + candle-core/src/op.rs | 2 ++ candle-core/src/shape.rs | 1 + candle-core/src/tensor.rs | 1 + candle-pyo3/src/lib.rs | 1 + 5 files changed, 6 insertions(+) diff --git a/candle-core/src/dtype.rs b/candle-core/src/dtype.rs index 91922b11..adfc4a3c 100644 --- a/candle-core/src/dtype.rs +++ b/candle-core/src/dtype.rs @@ -1,3 +1,4 @@ +#![allow(clippy::redundant_closure_call)] use crate::backend::BackendStorage; use crate::{CpuStorage, Error, Result}; diff --git a/candle-core/src/op.rs b/candle-core/src/op.rs index b0528494..adf1a225 100644 --- a/candle-core/src/op.rs +++ b/candle-core/src/op.rs @@ -1,3 +1,4 @@ +#![allow(clippy::redundant_closure_call)] use crate::{CpuStorage, CudaStorage, Layout, Result, Shape, Tensor}; use half::{bf16, f16}; use num_traits::float::Float; @@ -398,6 +399,7 @@ bin_op!( vd_max ); +#[allow(clippy::redundant_closure_call)] macro_rules! unary_op { ($op: ident, $name: literal, $a: ident, $e: expr) => { impl UnaryOpT for $op { diff --git a/candle-core/src/shape.rs b/candle-core/src/shape.rs index 49fbf022..aea8b887 100644 --- a/candle-core/src/shape.rs +++ b/candle-core/src/shape.rs @@ -1,3 +1,4 @@ +#![allow(clippy::redundant_closure_call)] use crate::{Error, Result}; #[derive(Clone, PartialEq, Eq)] diff --git a/candle-core/src/tensor.rs b/candle-core/src/tensor.rs index 46f9c53f..75b3743d 100644 --- a/candle-core/src/tensor.rs +++ b/candle-core/src/tensor.rs @@ -1,3 +1,4 @@ +#![allow(clippy::redundant_closure_call)] use crate::backend::{BackendDevice, BackendStorage}; use crate::op::{ BackpropOp, BinaryOp, CmpOp, CustomOp1, CustomOp2, CustomOp3, Op, ReduceOp, UnaryOp, diff --git a/candle-pyo3/src/lib.rs b/candle-pyo3/src/lib.rs index b3cc9374..4dd7b3ea 100644 --- a/candle-pyo3/src/lib.rs +++ b/candle-pyo3/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::redundant_closure_call)] // TODO: Handle negative dimension indexes. use pyo3::exceptions::{PyTypeError, PyValueError}; use pyo3::prelude::*;