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.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/lib.rs
+++ b/crates/jrsonnet-evaluator/src/lib.rs
@@ -47,6 +47,8 @@
clippy::mutable_key_type,
// false positives
clippy::redundant_pub_crate,
+ // Sometimes code is fancier without that
+ clippy::manual_let_else,
)]
// For jrsonnet-macros
crates/jrsonnet-evaluator/src/manifest.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/manifest.rs
+++ b/crates/jrsonnet-evaluator/src/manifest.rs
@@ -211,9 +211,9 @@
#[cfg(feature = "exp-bigint")]
Val::BigInt(n) => {
if options.preserve_bigints {
- write!(buf, "{n}").unwrap()
+ write!(buf, "{n}").unwrap();
} else {
- write!(buf, "{:?}", n.to_string()).unwrap()
+ write!(buf, "{:?}", n.to_string()).unwrap();
}
}
Val::Arr(items) => {