difftreelog
style fix clippy warnings
in: master
3 files changed
crates/jrsonnet-evaluator/src/evaluate/operator.rsdiffbeforeafterboth424243 (Num(v1), Num(v2)) => Val::new_checked_num(v1 + v2)?,43 (Num(v1), Num(v2)) => Val::new_checked_num(v1 + v2)?,44 #[cfg(feature = "exp-bigint")]44 #[cfg(feature = "exp-bigint")]45 (BigInt(a), BigInt(b)) => BigInt(Box::new((&**a).clone() + (&**b).clone())),45 (BigInt(a), BigInt(b)) => BigInt(Box::new(&**a + &**b)),46 _ => bail!(BinaryOperatorDoesNotOperateOnValues(46 _ => bail!(BinaryOperatorDoesNotOperateOnValues(47 BinaryOpType::Add,47 BinaryOpType::Add,48 a.value_type(),48 a.value_type(),180180181 // Bigint X Bigint181 // Bigint X Bigint182 #[cfg(feature = "exp-bigint")]182 #[cfg(feature = "exp-bigint")]183 (BigInt(a), Mul, BigInt(b)) => BigInt(Box::new((&**a).clone() * (&**b).clone())),183 (BigInt(a), Mul, BigInt(b)) => BigInt(Box::new(&**a * &**b)),184 #[cfg(feature = "exp-bigint")]184 #[cfg(feature = "exp-bigint")]185 (BigInt(a), Sub, BigInt(b)) => BigInt(Box::new((&**a).clone() - (&**b).clone())),185 (BigInt(a), Sub, BigInt(b)) => BigInt(Box::new(&**a - &**b)),186186187 _ => bail!(BinaryOperatorDoesNotOperateOnValues(187 _ => bail!(BinaryOperatorDoesNotOperateOnValues(188 op,188 op,crates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth47 clippy::mutable_key_type,47 clippy::mutable_key_type,48 // false positives48 // false positives49 clippy::redundant_pub_crate,49 clippy::redundant_pub_crate,50 // Sometimes code is fancier without that51 clippy::manual_let_else,50)]52)]515352// For jrsonnet-macros54// For jrsonnet-macroscrates/jrsonnet-evaluator/src/manifest.rsdiffbeforeafterboth211 #[cfg(feature = "exp-bigint")]211 #[cfg(feature = "exp-bigint")]212 Val::BigInt(n) => {212 Val::BigInt(n) => {213 if options.preserve_bigints {213 if options.preserve_bigints {214 write!(buf, "{n}").unwrap()214 write!(buf, "{n}").unwrap();215 } else {215 } else {216 write!(buf, "{:?}", n.to_string()).unwrap()216 write!(buf, "{:?}", n.to_string()).unwrap();217 }217 }218 }218 }219 Val::Arr(items) => {219 Val::Arr(items) => {