Skip to content

Commit

Permalink
Fix clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantumplation committed May 14, 2024
1 parent bbb96a4 commit 2ca4aae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/price_feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ mod tests {
is_inclusive: false,
},
};
let round_tripped = deserialize(&serialize(validity.clone())).unwrap();
let round_tripped = deserialize(&serialize(validity)).unwrap();
assert_eq!(validity, round_tripped);
}

Expand All @@ -314,7 +314,7 @@ mod tests {
lower_bound: IntervalBound::unix_timestamp(1000000, true),
upper_bound: IntervalBound::unix_timestamp(1005000, true),
};
let round_tripped = deserialize(&serialize(validity.clone())).unwrap();
let round_tripped = deserialize(&serialize(validity)).unwrap();
assert_eq!(validity, round_tripped);
}

Expand Down
10 changes: 3 additions & 7 deletions src/signature_aggregator/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,12 +628,8 @@ mod tests {
mpsc::Receiver<Vec<SignedPriceFeedEntry>>,
)> {
let mut rng = thread_rng();
let (shares, public_key) = keys::generate_with_dealer(
prices.len() as u16,
min,
IdentifierList::Default,
&mut rng,
)?;
let (shares, public_key) =
keys::generate_with_dealer(prices.len() as u16, min, IdentifierList::Default, rng)?;

let mut network = TestNetwork::new();
let (payload_sink, payload_source) = mpsc::channel(10);
Expand Down Expand Up @@ -704,7 +700,7 @@ mod tests {
price: Decimal::from_f64(price).unwrap(),
data: PriceFeed {
collateral_prices: collateral_prices
.into_iter()
.iter()
.map(|&p| BigUint::from(p))
.collect(),
synthetic: synthetic.into(),
Expand Down

0 comments on commit 2ca4aae

Please sign in to comment.