Skip to content

Commit 8a73d3c

Browse files
committed
succumb to the siren call of 'use'
1 parent f861ccb commit 8a73d3c

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

zingolib/src/lightclient/propose.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! LightClient function do_propose generates a proposal to send to specified addresses.
22
33
use crate::{
4+
data::proposal::ZingoProposal,
45
lightclient::LightClient,
56
wallet::tx_map_and_maybe_trees::{TxMapAndMaybeTrees, TxMapAndMaybeTreesTraitError},
67
};
@@ -169,10 +170,8 @@ impl LightClient {
169170
)
170171
.map_err(DoProposeError::Proposal)?;
171172

172-
self.update_latest_proposal(crate::data::proposal::ZingoProposal::Transfer(
173-
proposal.clone(),
174-
))
175-
.await;
173+
self.update_latest_proposal(ZingoProposal::Transfer(proposal.clone()))
174+
.await;
176175
Ok(proposal)
177176
}
178177

@@ -245,14 +244,12 @@ impl LightClient {
245244
)
246245
.map_err(DoProposeError::ShieldProposal)?;
247246

248-
self.update_latest_proposal(crate::data::proposal::ZingoProposal::Shield(
249-
proposed_shield.clone(),
250-
))
251-
.await;
247+
self.update_latest_proposal(ZingoProposal::Shield(proposed_shield.clone()))
248+
.await;
252249
Ok(proposed_shield)
253250
}
254251
/// A helper method that standardizes latest_proposal update
255-
async fn update_latest_proposal(&self, proposal: crate::data::proposal::ZingoProposal) {
252+
async fn update_latest_proposal(&self, proposal: ZingoProposal) {
256253
*(self.latest_proposal.write().await) = Some(proposal.clone());
257254
}
258255
}

0 commit comments

Comments
 (0)