Skip to content

Commit 74c8f25

Browse files
authored
Merge pull request #1285 from input-output-hk/jpraynaud/upgrade-rust-1.73.0
Upgrade Rust `1.73.0`
2 parents 79ce1da + 7604013 commit 74c8f25

File tree

11 files changed

+17
-19
lines changed

11 files changed

+17
-19
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.

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.3.108"
3+
version = "0.3.109"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-aggregator/src/runtime/state_machine.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ impl AggregatorRuntime {
7575
) -> Result<Self, RuntimeError> {
7676
info!("initializing runtime");
7777

78-
let state = if init_state.is_none() {
78+
let state = if let Some(init_state) = init_state {
79+
trace!("got initial state from caller");
80+
init_state
81+
} else {
7982
trace!("idle state, no current beacon");
8083
AggregatorState::Idle(IdleState {
8184
current_beacon: None,
8285
})
83-
} else {
84-
trace!("got initial state from caller");
85-
init_state.unwrap()
8686
};
8787

8888
Ok::<Self, RuntimeError>(Self {

mithril-client/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-client"
3-
version = "0.4.9"
3+
version = "0.4.10"
44
description = "A Mithril Client"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-client/src/aggregator_client/certificate_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl CertificateClient {
3232
let response = self.http_client.get_content(&url).await;
3333

3434
match response {
35-
Err(e) if matches!(e, AggregatorHTTPClientError::RemoteServerLogical(_)) => Ok(None),
35+
Err(AggregatorHTTPClientError::RemoteServerLogical(_)) => Ok(None),
3636
Err(e) => Err(e.into()),
3737
Ok(response) => {
3838
let message =

mithril-client/src/aggregator_client/mithril_stake_distribution_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl MithrilStakeDistributionClient {
5050

5151
Ok(Some(stake_distribution_entity))
5252
}
53-
Err(e) if matches!(e, AggregatorHTTPClientError::RemoteServerLogical(_)) => Ok(None),
53+
Err(AggregatorHTTPClientError::RemoteServerLogical(_)) => Ok(None),
5454
Err(e) => Err(e.into()),
5555
}
5656
}

mithril-client/src/services/snapshot.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,7 @@ impl SnapshotService for MithrilClientSnapshotService {
194194
.show(&self.expand_eventual_snapshot_alias(digest).await?)
195195
.await
196196
.map_err(|e| match &e.downcast_ref::<AggregatorHTTPClientError>() {
197-
Some(error)
198-
if matches!(error, &&AggregatorHTTPClientError::RemoteServerLogical(_)) =>
199-
{
197+
Some(AggregatorHTTPClientError::RemoteServerLogical(_)) => {
200198
SnapshotServiceError::SnapshotNotFound(digest.to_owned()).into()
201199
}
202200
_ => e,

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.2.123"
3+
version = "0.2.124"
44
authors = { workspace = true }
55
edition = { workspace = true }
66
documentation = { workspace = true }

mithril-common/src/database/version_checker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ impl SqlMigration {
154154

155155
impl PartialOrd for SqlMigration {
156156
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
157-
self.version.partial_cmp(&other.version)
157+
Some(self.cmp(other))
158158
}
159159
}
160160

161161
impl Ord for SqlMigration {
162162
fn cmp(&self, other: &Self) -> Ordering {
163-
self.partial_cmp(other).unwrap()
163+
self.version.cmp(&other.version)
164164
}
165165
}
166166

mithril-common/src/entities/certificate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl PartialOrd for Certificate {
130130
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
131131
// Order by beacon first then per hash
132132
match self.beacon.partial_cmp(&other.beacon) {
133-
Some(ordering) if ordering == Ordering::Equal => self.hash.partial_cmp(&other.hash),
133+
Some(Ordering::Equal) => self.hash.partial_cmp(&other.hash),
134134
Some(other) => Some(other),
135135
// Beacons may be not comparable (most likely because the network isn't the same) in
136136
// that case we can still order per hash

0 commit comments

Comments
 (0)