refactor clone

This commit is contained in:
Jack May
2022-04-13 22:46:50 -07:00
parent 468d9b3933
commit ad6df47c24
10 changed files with 172 additions and 21 deletions

View File

@ -2055,7 +2055,7 @@ impl Bank {
block_height: self.block_height,
collector_id: self.collector_id,
collector_fees: self.collector_fees.load(Relaxed),
fee_calculator: self.fee_calculator.clone(),
fee_calculator: self.fee_calculator,
fee_rate_governor: self.fee_rate_governor.clone(),
collected_rent: self.collected_rent.load(Relaxed),
rent_collector: self.rent_collector.clone(),
@ -12253,7 +12253,7 @@ pub(crate) mod tests {
StateMut::<nonce::state::Versions>::state(&acc).map(|v| v.convert_to_current());
match state {
Ok(nonce::State::Initialized(ref data)) => {
Some((data.blockhash, data.fee_calculator.clone()))
Some((data.blockhash, data.fee_calculator))
}
_ => None,
}
@ -12290,7 +12290,7 @@ pub(crate) mod tests {
StateMut::<nonce::state::Versions>::state(&acc).map(|v| v.convert_to_current());
match state {
Ok(nonce::State::Initialized(ref data)) => {
Some((data.blockhash, data.fee_calculator.clone()))
Some((data.blockhash, data.fee_calculator))
}
_ => None,
}
@ -12323,7 +12323,7 @@ pub(crate) mod tests {
StateMut::<nonce::state::Versions>::state(&acc).map(|v| v.convert_to_current());
match state {
Ok(nonce::State::Initialized(ref data)) => {
Some((data.blockhash, data.fee_calculator.clone()))
Some((data.blockhash, data.fee_calculator))
}
_ => None,
}
@ -12360,7 +12360,7 @@ pub(crate) mod tests {
StateMut::<nonce::state::Versions>::state(&acc).map(|v| v.convert_to_current());
match state {
Ok(nonce::State::Initialized(ref data)) => {
Some((data.blockhash, data.fee_calculator.clone()))
Some((data.blockhash, data.fee_calculator))
}
_ => None,
}