Skip to content

Commit d4263cb

Browse files
authored
update to Rust 1.82.0 (#6949)
1 parent dbd69a2 commit d4263cb

File tree

8 files changed

+16
-19
lines changed

8 files changed

+16
-19
lines changed

nexus/db-queries/src/db/on_conflict_ext.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ pub trait IncompleteOnConflictExt {
127127
/// _logically implies_ the condition on the partial index. With something
128128
/// like `time_deleted IS NULL` the value of that is not exactly clear, but
129129
/// you can imagine a partial index on something like `col >= 10`, and
130-
/// write `ON CONFLICT (...) WHERE col >= 20`. This is allowed because `col
131-
/// >= 20` implies `col >= 10`. (But `WHERE col >= 5` is not allowed.)
130+
/// write `ON CONFLICT (...) WHERE col >= 20`. This is allowed because
131+
/// `col >= 20` implies `col >= 10`. (But `WHERE col >= 5` is not allowed.)
132132
///
133133
/// ## 4. A similar syntax with a different meaning
134134
///

nexus/db-queries/src/db/pool_connection.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,13 @@ impl backend::Connector for DieselPgConnector {
9292
})
9393
.await
9494
.expect("Task panicked establishing connection")
95-
.map_err(|e| {
95+
.inspect_err(|e| {
9696
warn!(
9797
self.log,
9898
"Failed to make connection";
9999
"error" => e.to_string(),
100100
"backend" => backend.address,
101101
);
102-
e
103102
})?;
104103
Ok(conn)
105104
}

oximeter/db/src/client/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,17 +1185,16 @@ impl Client {
11851185
})?;
11861186

11871187
// Convert the HTTP response into a database response.
1188-
let response = handle_db_response(response).await.map_err(|err| {
1189-
probes::sql__query__done!(|| (&id));
1190-
err
1191-
})?;
1188+
let response =
1189+
handle_db_response(response).await.inspect_err(|_| {
1190+
probes::sql__query__done!(|| (&id));
1191+
})?;
11921192

11931193
// Extract the query summary, measuring resource usage and duration.
11941194
let summary =
11951195
QuerySummary::from_headers(start.elapsed(), response.headers())
1196-
.map_err(|err| {
1196+
.inspect_err(|_| {
11971197
probes::sql__query__done!(|| (&id));
1198-
err
11991198
})?;
12001199

12011200
// Extract the actual text of the response.

oximeter/types/src/histogram.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ where
10611061
let lo = base.pow(lo as _);
10621062
let hi = base.pow(hi as _);
10631063
let distance = hi - lo;
1064-
distance.is_multiple_of(&count)
1064+
Integer::is_multiple_of(&distance, &count)
10651065
})
10661066
}
10671067

package/src/bin/omicron-package.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,22 +1069,20 @@ async fn main() -> Result<()> {
10691069
let get_config = || -> Result<Config> {
10701070
let target_path = args.artifact_dir.join("target").join(&args.target);
10711071
let raw_target =
1072-
std::fs::read_to_string(&target_path).map_err(|e| {
1072+
std::fs::read_to_string(&target_path).inspect_err(|_| {
10731073
eprintln!(
10741074
"Failed to read build target: {}\n{}",
10751075
target_path,
10761076
target_help_str()
10771077
);
1078-
e
10791078
})?;
10801079
let target: Target = KnownTarget::from_str(&raw_target)
1081-
.map_err(|e| {
1080+
.inspect_err(|_| {
10821081
eprintln!(
10831082
"Failed to parse {} as target\n{}",
10841083
target_path,
10851084
target_help_str()
10861085
);
1087-
e
10881086
})?
10891087
.into();
10901088
debug!(log, "target[{}]: {:?}", args.target, target);

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
22
# We choose a specific toolchain (rather than "stable") for repeatability. The
33
# intent is to keep this up-to-date with recently-released stable Rust.
4-
channel = "1.80.1"
4+
channel = "1.82.0"
55
profile = "default"

sled-agent/src/instance_manager.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl InstanceManager {
146146
.tx
147147
.send(InstanceManagerRequest::EnsureRegistered {
148148
propolis_id,
149-
instance,
149+
instance: Box::new(instance),
150150
sled_identifiers: Box::new(sled_identifiers),
151151
tx,
152152
})
@@ -335,12 +335,12 @@ impl InstanceManager {
335335
enum InstanceManagerRequest {
336336
EnsureRegistered {
337337
propolis_id: PropolisUuid,
338-
instance: InstanceEnsureBody,
339338
// These are boxed because they are, apparently, quite large, and Clippy
340339
// whinges about the overall size of this variant relative to the
341340
// others. Since we will generally send `EnsureRegistered` requests much
342341
// less frequently than most of the others, boxing this seems like a
343342
// reasonable choice...
343+
instance: Box<InstanceEnsureBody>,
344344
sled_identifiers: Box<SledIdentifiers>,
345345
tx: oneshot::Sender<Result<SledVmmState, Error>>,
346346
},
@@ -462,7 +462,7 @@ impl InstanceManagerRunner {
462462
sled_identifiers,
463463
tx,
464464
}) => {
465-
tx.send(self.ensure_registered(propolis_id, instance, *sled_identifiers).await).map_err(|_| Error::FailedSendClientClosed)
465+
tx.send(self.ensure_registered(propolis_id, *instance, *sled_identifiers).await).map_err(|_| Error::FailedSendClientClosed)
466466
},
467467
Some(EnsureUnregistered { propolis_id, tx }) => {
468468
self.ensure_unregistered(tx, propolis_id)

workspace-hack/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[package]
66
name = "omicron-workspace-hack"
77
version = "0.1.0"
8+
edition = "2021"
89
description = "workspace-hack package, managed by hakari"
910
# You can choose to publish this crate: see https://docs.rs/cargo-hakari/latest/cargo_hakari/publishing.
1011
publish = false

0 commit comments

Comments
 (0)