Skip to content

Commit 50276bc

Browse files
Use StableBTreeMap::init instead of ::new
1 parent b46d98f commit 50276bc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rs/nns/governance/src/governance/voting_power_snapshots.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ fn insert_and_truncate<Value: Storable>(
6767
impl VotingPowerSnapshots {
6868
pub fn new(maps_memory: DefaultMemory, totals_memory: DefaultMemory) -> Self {
6969
Self {
70-
neuron_id_to_voting_power_maps: StableBTreeMap::new(maps_memory),
71-
voting_power_totals: StableBTreeMap::new(totals_memory),
70+
neuron_id_to_voting_power_maps: StableBTreeMap::init(maps_memory),
71+
voting_power_totals: StableBTreeMap::init(totals_memory),
7272
}
7373
}
7474

rs/nns/governance/unreleased_changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ on the process that this file is part of, see
1717

1818
## Fixed
1919

20+
* Use `StableBTreeMap::init` instead of `::new` for voting power snapshots.
21+
2022
## Security

0 commit comments

Comments
 (0)