Skip to content

Commit f444ae6

Browse files
committed
Apply some co-pilot feedback that seemed nice
1 parent 1815afd commit f444ae6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/snapshot_bootstrapper/src/snapshot_bootstrapper.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl UtxoCallback for SnapshotHandler {
131131
impl PoolCallback for SnapshotHandler {
132132
fn on_pools(&mut self, pools: Vec<PoolInfo>) -> Result<()> {
133133
info!("Received {} pools", pools.len());
134-
self.pools = pools;
134+
self.pools.extend(pools);
135135
// TODO: Publish pool data.
136136
Ok(())
137137
}
@@ -140,7 +140,7 @@ impl PoolCallback for SnapshotHandler {
140140
impl StakeCallback for SnapshotHandler {
141141
fn on_accounts(&mut self, accounts: Vec<AccountState>) -> Result<()> {
142142
info!("Received {} accounts", accounts.len());
143-
self.accounts = accounts;
143+
self.accounts.extend(accounts);
144144
// TODO: Publish account data.
145145
Ok(())
146146
}
@@ -149,7 +149,7 @@ impl StakeCallback for SnapshotHandler {
149149
impl DRepCallback for SnapshotHandler {
150150
fn on_dreps(&mut self, dreps: Vec<DRepInfo>) -> Result<()> {
151151
info!("Received {} DReps", dreps.len());
152-
self.dreps = dreps;
152+
self.dreps.extend(dreps);
153153
// TODO: Publish DRep data.
154154
Ok(())
155155
}
@@ -158,7 +158,7 @@ impl DRepCallback for SnapshotHandler {
158158
impl ProposalCallback for SnapshotHandler {
159159
fn on_proposals(&mut self, proposals: Vec<GovernanceProposal>) -> Result<()> {
160160
info!("Received {} proposals", proposals.len());
161-
self.proposals = proposals;
161+
self.proposals.extend(proposals);
162162
// TODO: Publish proposal data.
163163
Ok(())
164164
}

0 commit comments

Comments
 (0)