Skip to content

Commit d1a61c4

Browse files
authored
Merge pull request #2699 from input-output-hk/jpraynaud/fix-rust-1.90.0
fix: Rust `1.90` clippy warnings
2 parents 60ab714 + 0dae901 commit d1a61c4

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/cardano-node/mithril-cardano-node-internal-database/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-cardano-node-internal-database"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
description = "Mechanisms that allow Mithril nodes to read the files of a Cardano node internal database and compute digests from them"
55
authors.workspace = true
66
documentation.workspace = true

internal/cardano-node/mithril-cardano-node-internal-database/src/digesters/immutable_digester.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ pub(super) struct Progress {
177177
impl Progress {
178178
pub(super) fn report(&mut self, ix: usize) -> bool {
179179
self.index = ix;
180-
(20 * ix) % self.total == 0
180+
(20 * ix).is_multiple_of(self.total)
181181
}
182182

183183
pub(super) fn percent(&self) -> f64 {

internal/cardano-node/mithril-cardano-node-internal-database/src/test/dummy_cardano_db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl DummyCardanoDbBuilder {
211211
/// Note: by default, the size of the produced files is less than 1 kb.
212212
pub fn set_immutable_trio_file_size(&mut self, trio_file_size: u64) -> &mut Self {
213213
assert!(
214-
trio_file_size % 3 == 0,
214+
trio_file_size.is_multiple_of(3),
215215
"'trio_file_size' must be a multiple of 3"
216216
);
217217

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.7.84"
3+
version = "0.7.85"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-aggregator/src/database/record/signer_registration.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ impl From<SignerRegistrationRecord> for Signer {
6161
verification_key: other.verification_key.try_into().unwrap(),
6262
verification_key_signature: other
6363
.verification_key_signature
64-
.map(|k| (k.try_into().unwrap())),
65-
operational_certificate: other.operational_certificate.map(|o| (o.try_into().unwrap())),
64+
.map(|k| k.try_into().unwrap()),
65+
operational_certificate: other.operational_certificate.map(|o| o.try_into().unwrap()),
6666
kes_period: other.kes_period,
6767
}
6868
}
@@ -75,8 +75,8 @@ impl From<SignerRegistrationRecord> for SignerWithStake {
7575
verification_key: other.verification_key.try_into().unwrap(),
7676
verification_key_signature: other
7777
.verification_key_signature
78-
.map(|k| (k.try_into().unwrap())),
79-
operational_certificate: other.operational_certificate.map(|o| (o.try_into().unwrap())),
78+
.map(|k| k.try_into().unwrap()),
79+
operational_certificate: other.operational_certificate.map(|o| o.try_into().unwrap()),
8080
kes_period: other.kes_period,
8181
stake: other.stake.unwrap_or_default(),
8282
}

mithril-aggregator/src/services/epoch_service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ mod tests {
10191019

10201020
let stake_store = {
10211021
assert!(
1022-
self.total_stake % self.total_spo as u64 == 0,
1022+
self.total_stake.is_multiple_of(self.total_spo as u64),
10231023
"'total_stake' must be a multiple of 'total_spo' to create a uniform stake distribution"
10241024
);
10251025
let stake_per_spo = self.total_stake / self.total_spo as u64;

mithril-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-common"
3-
version = "0.6.17"
3+
version = "0.6.18"
44
description = "Common types, interfaces, and utilities for Mithril nodes."
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-common/src/messages/message_parts/signer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl From<SignerWithStake> for SignerWithStakeMessagePart {
107107
.map(|k| k.try_into().unwrap()),
108108
operational_certificate: value
109109
.operational_certificate
110-
.map(|op_cert| (op_cert.try_into().unwrap())),
110+
.map(|op_cert| op_cert.try_into().unwrap()),
111111
kes_period: value.kes_period,
112112
stake: value.stake,
113113
}
@@ -230,7 +230,7 @@ impl From<Signer> for SignerMessagePart {
230230
.map(|k| k.try_into().unwrap()),
231231
operational_certificate: value
232232
.operational_certificate
233-
.map(|op_cert| (op_cert.try_into().unwrap())),
233+
.map(|op_cert| op_cert.try_into().unwrap()),
234234
kes_period: value.kes_period,
235235
}
236236
}

0 commit comments

Comments
 (0)