From a87619daa467e2201c4380945671f45516e83bea Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sat, 12 Aug 2023 16:46:28 +0700 Subject: [PATCH] clippy: Fix auto deref warnings. --- src/bigint/convert.rs | 4 ++-- src/biguint.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bigint/convert.rs b/src/bigint/convert.rs index f3622035..774f20ba 100644 --- a/src/bigint/convert.rs +++ b/src/bigint/convert.rs @@ -389,7 +389,7 @@ pub(super) fn from_signed_bytes_be(digits: &[u8]) -> BigInt { // two's-complement the content to retrieve the magnitude let mut digits = Vec::from(digits); twos_complement_be(&mut digits); - BigInt::from_biguint(sign, BigUint::from_bytes_be(&*digits)) + BigInt::from_biguint(sign, BigUint::from_bytes_be(&digits)) } else { BigInt::from_biguint(sign, BigUint::from_bytes_be(digits)) } @@ -407,7 +407,7 @@ pub(super) fn from_signed_bytes_le(digits: &[u8]) -> BigInt { // two's-complement the content to retrieve the magnitude let mut digits = Vec::from(digits); twos_complement_le(&mut digits); - BigInt::from_biguint(sign, BigUint::from_bytes_le(&*digits)) + BigInt::from_biguint(sign, BigUint::from_bytes_le(&digits)) } else { BigInt::from_biguint(sign, BigUint::from_bytes_le(digits)) } diff --git a/src/biguint.rs b/src/biguint.rs index d1f60ce9..2ca6fc5a 100644 --- a/src/biguint.rs +++ b/src/biguint.rs @@ -589,7 +589,7 @@ impl BigUint { } else { let mut v = bytes.to_vec(); v.reverse(); - BigUint::from_bytes_le(&*v) + BigUint::from_bytes_le(&v) } }