Skip to content

Commit b382c40

Browse files
committed
fix: clippy warnings with Rust '1.80.0'
1 parent 3b6557b commit b382c40

File tree

10 files changed

+16
-14
lines changed

10 files changed

+16
-14
lines changed

internal/mithril-build-script/src/fake_aggregator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl FakeAggregatorData {
3636

3737
for entry in list_json_files_in_folder(folder) {
3838
let filename = entry.file_name().to_string_lossy().to_string();
39-
let file_content = fs::read_to_string(&entry.path()).unwrap_or_else(|_| {
39+
let file_content = fs::read_to_string(entry.path()).unwrap_or_else(|_| {
4040
panic!(
4141
"Could not read file content, file_path: {}",
4242
entry.path().display()

mithril-client-cli/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! * Cardano DB: List, Show, download and verify
66
//! * Mithril Stake Distribution: List, download and verify
77
//
8-
//! You can find more information on how it works reading the [documentation website](https://mithril.network/doc/mithril/mithril-network/client).
8+
//! You can find more information on how it works reading the [documentation website](https://mithril.network/doc/mithril/mithril-network/client).
99
1010
pub mod commands;
1111
mod configuration;

mithril-client/src/cardano_transaction_client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
//!
33
//! In order to do so it defines a [CardanoTransactionClient] which exposes the following features:
44
//! - [get_proofs][CardanoTransactionClient::get_proofs]: get a [cryptographic proof][CardanoTransactionsProofs]
5-
//! that the transactions with given hash are included in the global Cardano transactions set.
5+
//! that the transactions with given hash are included in the global Cardano transactions set.
66
//! - [get][CardanoTransactionClient::get_snapshot]: get a [Cardano transaction snapshot][CardanoTransactionSnapshot]
7-
//! data from its hash.
7+
//! data from its hash.
88
//! - [list][CardanoTransactionClient::list_snapshots]: get the list of the latest available Cardano transaction
9-
//! snapshot.
9+
//! snapshot.
1010
//!
1111
//! **Important:** Verifying a proof **only** means that its cryptography is valid, in order to certify that a Cardano
1212
//! transactions subset is valid, the associated proof must be tied to a valid Mithril certificate (see the example below).

mithril-client/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! - [Snapshot][snapshot_client] list, get, download tarball and record statistics.
1010
//! - [Mithril stake distribution][mithril_stake_distribution_client] list and get.
1111
//! - [Cardano transactions][cardano_transaction_client] list & get snapshot, get proofs
12-
//! _(available using crate feature_ **unstable**_)_.
12+
//! _(available using crate feature_ **unstable**_)_.
1313
//! - [Certificates][certificate_client] list, get, and chain validation.
1414
//!
1515
//! The [Client] aggregates the queries of all of those types.

mithril-common/src/entities/certificate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl Certificate {
104104
}
105105
CertificateSignature::MultiSignature(signed_entity_type, signature) => {
106106
signed_entity_type.feed_hash(&mut hasher);
107-
hasher.update(&signature.to_json_hex().unwrap());
107+
hasher.update(signature.to_json_hex().unwrap());
108108
}
109109
};
110110
hex::encode(hasher.finalize())

mithril-common/src/entities/signed_entity_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ impl CardanoTransactionsSigningConfig {
137137
///
138138
/// *Notes:*
139139
/// * *The step is adjusted to be a multiple of the block range length in order
140-
/// to guarantee that the block number signed in a certificate is effectively signed.*
140+
/// to guarantee that the block number signed in a certificate is effectively signed.*
141141
/// * *1 is subtracted to the result because block range end is exclusive (ie: a BlockRange over
142-
/// `30..45` finish at 44 included, 45 is included in the next block range).*
142+
/// `30..45` finish at 44 included, 45 is included in the next block range).*
143143
pub fn compute_block_number_to_be_signed(&self, block_number: BlockNumber) -> BlockNumber {
144144
// TODO: See if we can remove this adjustment by including a "partial" block range in
145145
// the signed data.

mithril-common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//! Provide:
77
//! - [Digester][digesters] to compute mithril digest from a Cardano database
88
//! - Helpers for the [Mithril STM](https://mithril.network/rust-doc/mithril_stm/index.html)
9-
//! lib with the [crypto_helper].
9+
//! lib with the [crypto_helper].
1010
//! - [certificate chain][certificate_chain] used to validate the Certificate Chain created by an aggregator
1111
//! - The [entities] used by, and exchanged between, the aggregator, signers and client.
1212

mithril-stm/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,7 @@ harness = false
5454
default = ["rug-backend"]
5555
rug-backend = ["rug/default"]
5656
num-integer-backend = ["num-bigint", "num-rational", "num-traits"]
57-
portable = [] # deprecated, will be removed soon
58-
benchmark-internals = [] # For benchmarking multi_sig
57+
portable = [] # deprecated, will be removed soon
58+
benchmark-internals = [] # For benchmarking multi_sig
59+
batch-verify-aggregates = [
60+
] # For batch verification of multi-signatures (set automatically by build script)

mithril-stm/src/merkle_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ impl<D: Clone + Digest> MerkleTreeCommitmentBatchCompat<D> {
367367
new_hashes.push(
368368
D::new()
369369
.chain(&leaves[i])
370-
.chain(&D::digest([0u8]))
370+
.chain(D::digest([0u8]))
371371
.finalize()
372372
.to_vec(),
373373
);

mithril-stm/src/stm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ impl<D: Clone + Digest + FixedOutput + Send + Sync> StmAggrSig<D> {
774774
/// * the lottery is indeed won by each one of them,
775775
/// * the merkle tree path is valid,
776776
/// * the aggregate signature validates with respect to the aggregate verification key
777-
/// (aggregation is computed using functions `MSP.BKey` and `MSP.BSig` as described in Section 2.4 of the paper).
777+
/// (aggregation is computed using functions `MSP.BKey` and `MSP.BSig` as described in Section 2.4 of the paper).
778778
pub fn verify(
779779
&self,
780780
msg: &[u8],

0 commit comments

Comments
 (0)