Skip to content

Commit

Permalink
Merge pull request input-output-hk#1749 from input-output-hk/jpraynau…
Browse files Browse the repository at this point in the history
…d/fix-clippy-warning-rust-1.79.0

fix: clippy warnings with Rust `1.79.0`
  • Loading branch information
jpraynaud authored Jun 14, 2024
2 parents 8fa65dc + 9518778 commit 93c0a5e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/mithril-persistence/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-persistence"
version = "0.2.6"
version = "0.2.7"
description = "Common types, interfaces, and utilities to persist data for Mithril nodes."
authors = { workspace = true }
edition = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ where
{
/// MemoryAdapter factory
pub fn new(data: Option<Vec<(K, V)>>) -> Result<Self, AdapterError> {
let data = match data {
None => Vec::new(),
Some(v) => v,
};
let data = data.unwrap_or_default();
let mut values = HashMap::new();
let mut index = Vec::new();

Expand Down
2 changes: 1 addition & 1 deletion mithril-aggregator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-aggregator"
version = "0.5.20"
version = "0.5.21"
description = "A Mithril Aggregator server"
authors = { workspace = true }
edition = { workspace = true }
Expand Down
11 changes: 7 additions & 4 deletions mithril-aggregator/src/store/verification_key_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@ impl VerificationKeyStorer for VerificationKeyStore {
epoch: Epoch,
signer: SignerWithStake,
) -> StdResult<Option<SignerWithStake>> {
let mut signers = match self.adapter.read().await.get_record(&epoch).await? {
Some(s) => s,
None => HashMap::new(),
};
let mut signers = self
.adapter
.read()
.await
.get_record(&epoch)
.await?
.unwrap_or_default();
let prev_signer = signers.insert(signer.party_id.to_owned(), signer.clone());
self.adapter
.write()
Expand Down

0 comments on commit 93c0a5e

Please sign in to comment.