git.delta.rocks / jrsonnet / refs/commits / 07648052cee3

difftreelog

style fix clippy warnings

Yaroslav Bolyukin2024-03-03parent: #8193aab.patch.diff
in: master

3 files changed

modifiedcrates/jrsonnet-evaluator/src/evaluate/operator.rsdiffbeforeafterboth
4242
43 (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(),
180180
181 // Bigint X Bigint181 // Bigint X Bigint
182 #[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)),
186186
187 _ => bail!(BinaryOperatorDoesNotOperateOnValues(187 _ => bail!(BinaryOperatorDoesNotOperateOnValues(
188 op,188 op,
modifiedcrates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth
47 clippy::mutable_key_type,47 clippy::mutable_key_type,
48 // false positives48 // false positives
49 clippy::redundant_pub_crate,49 clippy::redundant_pub_crate,
50 // Sometimes code is fancier without that
51 clippy::manual_let_else,
50)]52)]
5153
52// For jrsonnet-macros54// For jrsonnet-macros
modifiedcrates/jrsonnet-evaluator/src/manifest.rsdiffbeforeafterboth
211 #[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) => {