Skip to content

Commit

Permalink
Merge pull request #2328 from ljedrz/cleanup/indexmap_warns
Browse files Browse the repository at this point in the history
Avoid deprecation warnings from indexmap
  • Loading branch information
howardwu authored Feb 10, 2024
2 parents 2127981 + 8125818 commit f7fef2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ledger/store/src/program/finalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ pub trait FinalizeStorage<N: Network>: 'static + Clone + Send + Sync {
None => bail!("Illegal operation: program ID '{program_id}' is not initialized - cannot remove mapping."),
};
// Remove the mapping name.
if !mapping_names.remove(&mapping_name) {
if !mapping_names.shift_remove(&mapping_name) {
bail!("Illegal operation: mapping '{mapping_name}' does not exist in storage - cannot remove mapping.");
}

Expand Down
4 changes: 2 additions & 2 deletions synthesizer/process/src/stack/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ impl<N: Network> Stack<N> {
/// Removes the proving key for the given function name.
#[inline]
pub fn remove_proving_key(&self, function_name: &Identifier<N>) {
self.proving_keys.write().remove(function_name);
self.proving_keys.write().shift_remove(function_name);
}

/// Removes the verifying key for the given function name.
#[inline]
pub fn remove_verifying_key(&self, function_name: &Identifier<N>) {
self.verifying_keys.write().remove(function_name);
self.verifying_keys.write().shift_remove(function_name);
}
}

Expand Down

0 comments on commit f7fef2a

Please sign in to comment.