difftreelog
style fix clippy warnings
in: master
3 files changed
crates/jrsonnet-evaluator/src/evaluate/operator.rsdiffbeforeafterboth--- a/crates/jrsonnet-evaluator/src/evaluate/operator.rs
+++ b/crates/jrsonnet-evaluator/src/evaluate/operator.rs
@@ -42,7 +42,7 @@
(Num(v1), Num(v2)) => Val::new_checked_num(v1 + v2)?,
#[cfg(feature = "exp-bigint")]
- (BigInt(a), BigInt(b)) => BigInt(Box::new((&**a).clone() + (&**b).clone())),
+ (BigInt(a), BigInt(b)) => BigInt(Box::new(&**a + &**b)),
_ => bail!(BinaryOperatorDoesNotOperateOnValues(
BinaryOpType::Add,
a.value_type(),
@@ -180,9 +180,9 @@
// Bigint X Bigint
#[cfg(feature = "exp-bigint")]
- (BigInt(a), Mul, BigInt(b)) => BigInt(Box::new((&**a).clone() * (&**b).clone())),
+ (BigInt(a), Mul, BigInt(b)) => BigInt(Box::new(&**a * &**b)),
#[cfg(feature = "exp-bigint")]
- (BigInt(a), Sub, BigInt(b)) => BigInt(Box::new((&**a).clone() - (&**b).clone())),
+ (BigInt(a), Sub, BigInt(b)) => BigInt(Box::new(&**a - &**b)),
_ => bail!(BinaryOperatorDoesNotOperateOnValues(
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.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) => {