From c2f35151c7ac345305f396bc01f088083ccae7e0 Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Wed, 22 May 2024 21:22:46 -0700 Subject: [PATCH] update to Rust 1.78.0 / bump OPTE to 0.29.250 (#5722) --- .cargo/{config => config.toml} | 0 .github/buildomat/jobs/a4x2-deploy.sh | 2 +- .github/buildomat/jobs/a4x2-prepare.sh | 2 +- .../buildomat/jobs/build-and-test-helios.sh | 2 +- .../buildomat/jobs/build-and-test-linux.sh | 2 +- .github/buildomat/jobs/clippy.sh | 2 +- .github/buildomat/jobs/omicron-common.sh | 2 +- .github/buildomat/jobs/package.sh | 2 +- .github/buildomat/jobs/tuf-repo.sh | 2 +- Cargo.lock | 14 ++++---- Cargo.toml | 4 +-- certificates/src/lib.rs | 4 +-- dev-tools/omdb/src/bin/omdb/db.rs | 19 ---------- dev-tools/omdb/src/bin/omdb/mgs/dashboard.rs | 10 ------ dev-tools/omdb/src/bin/omdb/mgs/sensors.rs | 4 +-- nexus/db-model/src/omicron_zone_config.rs | 4 +-- nexus/db-queries/src/db/datastore/mod.rs | 4 +-- nexus/db-queries/src/db/explain.rs | 35 ++++--------------- nexus/db-queries/src/db/raw_query_builder.rs | 12 ------- .../background/sync_switch_configuration.rs | 3 +- nexus/src/app/sagas/snapshot_create.rs | 9 ++--- .../db/src/oxql/ast/table_ops/group_by.rs | 2 +- oximeter/db/src/oxql/ast/table_ops/limit.rs | 4 +-- rust-toolchain.toml | 2 +- sled-agent/src/bootstrap/rss_handle.rs | 8 ----- sled-hardware/src/illumos/mod.rs | 2 +- sled-storage/src/resources.rs | 2 +- tools/opte_version | 2 +- wicket/src/ui/defaults/dimensions.rs | 14 -------- wicketd/src/update_tracker.rs | 2 +- 30 files changed, 44 insertions(+), 132 deletions(-) rename .cargo/{config => config.toml} (100%) diff --git a/.cargo/config b/.cargo/config.toml similarity index 100% rename from .cargo/config rename to .cargo/config.toml diff --git a/.github/buildomat/jobs/a4x2-deploy.sh b/.github/buildomat/jobs/a4x2-deploy.sh index 323b3e2e28..c8eb998b35 100755 --- a/.github/buildomat/jobs/a4x2-deploy.sh +++ b/.github/buildomat/jobs/a4x2-deploy.sh @@ -2,7 +2,7 @@ #: #: name = "a4x2-deploy" #: variety = "basic" -#: target = "lab-2.0-opte-0.27" +#: target = "lab-2.0-opte-0.29" #: output_rules = [ #: "/out/falcon/*.log", #: "/out/falcon/*.err", diff --git a/.github/buildomat/jobs/a4x2-prepare.sh b/.github/buildomat/jobs/a4x2-prepare.sh index 1e603fc7d9..1438ec06de 100755 --- a/.github/buildomat/jobs/a4x2-prepare.sh +++ b/.github/buildomat/jobs/a4x2-prepare.sh @@ -3,7 +3,7 @@ #: name = "a4x2-prepare" #: variety = "basic" #: target = "helios-2.0" -#: rust_toolchain = "1.77.2" +#: rust_toolchain = "1.78.0" #: output_rules = [ #: "=/out/cargo-bay-ce.tgz", #: "=/out/cargo-bay-cr1.tgz", diff --git a/.github/buildomat/jobs/build-and-test-helios.sh b/.github/buildomat/jobs/build-and-test-helios.sh index a4cbd978a9..b63d2e783f 100755 --- a/.github/buildomat/jobs/build-and-test-helios.sh +++ b/.github/buildomat/jobs/build-and-test-helios.sh @@ -3,7 +3,7 @@ #: name = "build-and-test (helios)" #: variety = "basic" #: target = "helios-2.0" -#: rust_toolchain = "1.77.2" +#: rust_toolchain = "1.78.0" #: output_rules = [ #: "%/work/*", #: "%/var/tmp/omicron_tmp/*", diff --git a/.github/buildomat/jobs/build-and-test-linux.sh b/.github/buildomat/jobs/build-and-test-linux.sh index f10f07ff7a..4a1f86c3e1 100755 --- a/.github/buildomat/jobs/build-and-test-linux.sh +++ b/.github/buildomat/jobs/build-and-test-linux.sh @@ -3,7 +3,7 @@ #: name = "build-and-test (ubuntu-22.04)" #: variety = "basic" #: target = "ubuntu-22.04" -#: rust_toolchain = "1.77.2" +#: rust_toolchain = "1.78.0" #: output_rules = [ #: "%/work/*", #: "%/var/tmp/omicron_tmp/*", diff --git a/.github/buildomat/jobs/clippy.sh b/.github/buildomat/jobs/clippy.sh index a5007694ab..1f4c578e47 100755 --- a/.github/buildomat/jobs/clippy.sh +++ b/.github/buildomat/jobs/clippy.sh @@ -3,7 +3,7 @@ #: name = "clippy (helios)" #: variety = "basic" #: target = "helios-2.0" -#: rust_toolchain = "1.77.2" +#: rust_toolchain = "1.78.0" #: output_rules = [] # Run clippy on illumos (not just other systems) because a bunch of our code diff --git a/.github/buildomat/jobs/omicron-common.sh b/.github/buildomat/jobs/omicron-common.sh index b238eec7c6..345d99f405 100755 --- a/.github/buildomat/jobs/omicron-common.sh +++ b/.github/buildomat/jobs/omicron-common.sh @@ -3,7 +3,7 @@ #: name = "omicron-common (helios)" #: variety = "basic" #: target = "helios-2.0" -#: rust_toolchain = "1.77.2" +#: rust_toolchain = "1.78.0" #: output_rules = [] # Verify that omicron-common builds successfully when used as a dependency diff --git a/.github/buildomat/jobs/package.sh b/.github/buildomat/jobs/package.sh index 63e5e1ce71..81ed41a961 100755 --- a/.github/buildomat/jobs/package.sh +++ b/.github/buildomat/jobs/package.sh @@ -3,7 +3,7 @@ #: name = "helios / package" #: variety = "basic" #: target = "helios-2.0" -#: rust_toolchain = "1.77.2" +#: rust_toolchain = "1.78.0" #: output_rules = [ #: "=/work/package.tar.gz", #: ] diff --git a/.github/buildomat/jobs/tuf-repo.sh b/.github/buildomat/jobs/tuf-repo.sh index 2e3050b489..5b2d1bd405 100755 --- a/.github/buildomat/jobs/tuf-repo.sh +++ b/.github/buildomat/jobs/tuf-repo.sh @@ -3,7 +3,7 @@ #: name = "helios / build TUF repo" #: variety = "basic" #: target = "helios-2.0" -#: rust_toolchain = "1.77.2" +#: rust_toolchain = "1.78.0" #: output_rules = [ #: "=/work/manifest.toml", #: "=/work/repo.zip", diff --git a/Cargo.lock b/Cargo.lock index 0d534a3c2f..1dfaff0d77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1732,7 +1732,7 @@ dependencies = [ [[package]] name = "derror-macro" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" +source = "git+https://github.com/oxidecomputer/opte?rev=194a8d1d6443f78d59702a25849607dba33db732#194a8d1d6443f78d59702a25849607dba33db732" dependencies = [ "darling", "proc-macro2", @@ -3481,7 +3481,7 @@ dependencies = [ [[package]] name = "illumos-sys-hdrs" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" +source = "git+https://github.com/oxidecomputer/opte?rev=194a8d1d6443f78d59702a25849607dba33db732#194a8d1d6443f78d59702a25849607dba33db732" [[package]] name = "illumos-utils" @@ -3894,7 +3894,7 @@ dependencies = [ [[package]] name = "kstat-macro" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" +source = "git+https://github.com/oxidecomputer/opte?rev=194a8d1d6443f78d59702a25849607dba33db732#194a8d1d6443f78d59702a25849607dba33db732" dependencies = [ "quote", "syn 2.0.64", @@ -6019,7 +6019,7 @@ dependencies = [ [[package]] name = "opte" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" +source = "git+https://github.com/oxidecomputer/opte?rev=194a8d1d6443f78d59702a25849607dba33db732#194a8d1d6443f78d59702a25849607dba33db732" dependencies = [ "cfg-if", "derror-macro", @@ -6037,7 +6037,7 @@ dependencies = [ [[package]] name = "opte-api" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" +source = "git+https://github.com/oxidecomputer/opte?rev=194a8d1d6443f78d59702a25849607dba33db732#194a8d1d6443f78d59702a25849607dba33db732" dependencies = [ "illumos-sys-hdrs", "ipnetwork", @@ -6049,7 +6049,7 @@ dependencies = [ [[package]] name = "opte-ioctl" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" +source = "git+https://github.com/oxidecomputer/opte?rev=194a8d1d6443f78d59702a25849607dba33db732#194a8d1d6443f78d59702a25849607dba33db732" dependencies = [ "libc", "libnet 0.1.0 (git+https://github.com/oxidecomputer/netadm-sys)", @@ -6123,7 +6123,7 @@ dependencies = [ [[package]] name = "oxide-vpc" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/opte?rev=4cc823b50d3e4a629cdfaab2b3d3382514174ba9#4cc823b50d3e4a629cdfaab2b3d3382514174ba9" +source = "git+https://github.com/oxidecomputer/opte?rev=194a8d1d6443f78d59702a25849607dba33db732#194a8d1d6443f78d59702a25849607dba33db732" dependencies = [ "cfg-if", "illumos-sys-hdrs", diff --git a/Cargo.toml b/Cargo.toml index 16207d2f31..ed2b7cdcfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -347,14 +347,14 @@ omicron-sled-agent = { path = "sled-agent" } omicron-test-utils = { path = "test-utils" } omicron-zone-package = "0.11.0" oxide-client = { path = "clients/oxide-client" } -oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "4cc823b50d3e4a629cdfaab2b3d3382514174ba9", features = [ "api", "std" ] } +oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "194a8d1d6443f78d59702a25849607dba33db732", features = [ "api", "std" ] } once_cell = "1.19.0" openapi-lint = { git = "https://github.com/oxidecomputer/openapi-lint", branch = "main" } openapiv3 = "2.0.0" # must match samael's crate! openssl = "0.10" openssl-sys = "0.9" -opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "4cc823b50d3e4a629cdfaab2b3d3382514174ba9" } +opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "194a8d1d6443f78d59702a25849607dba33db732" } oso = "0.27" owo-colors = "4.0.0" oximeter = { path = "oximeter/oximeter" } diff --git a/certificates/src/lib.rs b/certificates/src/lib.rs index 442a9cfdd5..ee4ab4a6bd 100644 --- a/certificates/src/lib.rs +++ b/certificates/src/lib.rs @@ -412,7 +412,7 @@ mod tests { // Valid certs: either no key usage values, or valid ones. for ext_key_usage in &valid_ext_key_usage { let mut params = CertificateParams::new(vec![HOST.to_string()]); - params.extended_key_usages = ext_key_usage.clone(); + params.extended_key_usages.clone_from(ext_key_usage); assert!( validate_cert_with_params(params, &[HOST]).is_ok(), @@ -431,7 +431,7 @@ mod tests { for ext_key_usage in &invalid_ext_key_usage { let mut params = CertificateParams::new(vec![HOST.to_string()]); - params.extended_key_usages = ext_key_usage.clone(); + params.extended_key_usages.clone_from(ext_key_usage); assert!( matches!( diff --git a/dev-tools/omdb/src/bin/omdb/db.rs b/dev-tools/omdb/src/bin/omdb/db.rs index 5b029b0908..549f289ad0 100644 --- a/dev-tools/omdb/src/bin/omdb/db.rs +++ b/dev-tools/omdb/src/bin/omdb/db.rs @@ -1273,16 +1273,6 @@ async fn cmd_db_disk_physical( // SERVICES -#[derive(Tabled)] -#[tabled(rename_all = "SCREAMING_SNAKE_CASE")] -struct ServiceInstanceRow { - #[tabled(rename = "SERVICE")] - kind: String, - instance_id: Uuid, - addr: String, - sled_serial: String, -} - // Snapshots fn format_snapshot(state: &SnapshotState) -> impl Display { match state { @@ -1438,15 +1428,6 @@ async fn cmd_db_snapshot_info( // SLEDS -#[derive(Tabled)] -#[tabled(rename_all = "SCREAMING_SNAKE_CASE")] -struct ServiceInstanceSledRow { - #[tabled(rename = "SERVICE")] - kind: String, - instance_id: Uuid, - addr: String, -} - #[derive(Tabled)] #[tabled(rename_all = "SCREAMING_SNAKE_CASE")] struct SledRow { diff --git a/dev-tools/omdb/src/bin/omdb/mgs/dashboard.rs b/dev-tools/omdb/src/bin/omdb/mgs/dashboard.rs index 08ecaf3101..cd7628a840 100644 --- a/dev-tools/omdb/src/bin/omdb/mgs/dashboard.rs +++ b/dev-tools/omdb/src/bin/omdb/mgs/dashboard.rs @@ -101,16 +101,6 @@ trait Attributes: DynClone { fn y_axis_label(&self) -> String; fn axis_value(&self, val: f64) -> String; fn legend_value(&self, val: f64) -> String; - - fn increase(&mut self, _ndx: usize) -> Option { - None - } - - fn decrease(&mut self, _ndx: usize) -> Option { - None - } - - fn clear(&mut self) {} } dyn_clone::clone_trait_object!(Attributes); diff --git a/dev-tools/omdb/src/bin/omdb/mgs/sensors.rs b/dev-tools/omdb/src/bin/omdb/mgs/sensors.rs index d00bebd96c..f36e8633f9 100644 --- a/dev-tools/omdb/src/bin/omdb/mgs/sensors.rs +++ b/dev-tools/omdb/src/bin/omdb/mgs/sensors.rs @@ -480,12 +480,10 @@ fn sp_info_csv( } if let Some(sensor) = Sensor::from_string(&record[1], &record[2]) { - if sensors.get(&sensor).is_some() { + if !sensors.insert(sensor.clone()) { break; } - sensors.insert(sensor.clone()); - for (ndx, sp) in sps.iter().enumerate() { if let Some(sp) = sp { let value = match record[ndx + len].parse::() { diff --git a/nexus/db-model/src/omicron_zone_config.rs b/nexus/db-model/src/omicron_zone_config.rs index 05383cd056..c2258dba6c 100644 --- a/nexus/db-model/src/omicron_zone_config.rs +++ b/nexus/db-model/src/omicron_zone_config.rs @@ -92,7 +92,7 @@ impl OmicronZone { let (first_port, last_port) = snat_cfg.port_range_raw(); ntp_ntp_servers = Some(ntp_servers.clone()); ntp_dns_servers = Some(dns_servers.clone()); - ntp_ntp_domain = domain.clone(); + ntp_ntp_domain.clone_from(domain); snat_ip = Some(IpNetwork::from(snat_cfg.ip)); snat_first_port = Some(SqlU16::from(first_port)); snat_last_port = Some(SqlU16::from(last_port)); @@ -162,7 +162,7 @@ impl OmicronZone { } => { ntp_ntp_servers = Some(ntp_servers.clone()); ntp_dns_servers = Some(dns_servers.clone()); - ntp_ntp_domain = domain.clone(); + ntp_ntp_domain.clone_from(domain); (ZoneType::InternalNtp, address, None) } OmicronZoneType::Nexus { diff --git a/nexus/db-queries/src/db/datastore/mod.rs b/nexus/db-queries/src/db/datastore/mod.rs index 7c2cf8cf81..1618395800 100644 --- a/nexus/db-queries/src/db/datastore/mod.rs +++ b/nexus/db-queries/src/db/datastore/mod.rs @@ -984,8 +984,8 @@ mod test { // This is a little goofy, but it catches a bug that has // happened before. The returned columns share names (like // "id"), so we need to process them in-order. - assert!(regions.get(&dataset.id()).is_none()); - assert!(disk_datasets.get(®ion.id()).is_none()); + assert!(!regions.contains(&dataset.id())); + assert!(!disk_datasets.contains(®ion.id())); // Dataset must not be eligible for provisioning. if let Some(kind) = diff --git a/nexus/db-queries/src/db/explain.rs b/nexus/db-queries/src/db/explain.rs index 3de5b4f280..24fd993040 100644 --- a/nexus/db-queries/src/db/explain.rs +++ b/nexus/db-queries/src/db/explain.rs @@ -4,6 +4,11 @@ //! Utility allowing Diesel to EXPLAIN queries. +// These utilities can be useful during development, so we don't want to +// `#[cfg(test)]` the module, but it's likely they won't be used outside of +// tests. +#![cfg_attr(not(test), allow(dead_code))] + use super::pool::DbConnection; use async_bb8_diesel::AsyncRunQueryDsl; use async_trait::async_trait; @@ -17,33 +22,6 @@ use diesel::result::Error as DieselError; /// Q: The Query we're explaining. /// /// EXPLAIN: -pub trait Explainable { - /// Syncronously issues an explain statement. - fn explain( - self, - conn: &mut DbConnection, - ) -> Result; -} - -impl Explainable for Q -where - Q: QueryFragment - + QueryId - + RunQueryDsl - + Sized - + 'static, -{ - fn explain( - self, - conn: &mut DbConnection, - ) -> Result { - Ok(ExplainStatement { query: self } - .get_results::(conn)? - .join("\n")) - } -} - -/// An async variant of [`Explainable`]. #[async_trait] pub trait ExplainableAsync { /// Asynchronously issues an explain statement. @@ -185,7 +163,8 @@ mod test { logctx.cleanup_successful(); } - // Tests that ".explain()" can tell us when we're doing full table scans. + // Tests that ".explain_async()" can tell us when we're doing full table + // scans. #[tokio::test] async fn test_explain_full_table_scan() { let logctx = dev::test_setup_log("test_explain_full_table_scan"); diff --git a/nexus/db-queries/src/db/raw_query_builder.rs b/nexus/db-queries/src/db/raw_query_builder.rs index 5c803e20ac..c7215417c5 100644 --- a/nexus/db-queries/src/db/raw_query_builder.rs +++ b/nexus/db-queries/src/db/raw_query_builder.rs @@ -69,18 +69,6 @@ enum TrustedStrVariants { ValidatedExplicitly(String), } -trait SqlQueryBinds { - fn add_bind(self, bind_counter: &BindParamCounter) -> Self; -} - -impl<'a, Query> SqlQueryBinds - for diesel::query_builder::BoxedSqlQuery<'a, Pg, Query> -{ - fn add_bind(self, bind_counter: &BindParamCounter) -> Self { - self.sql("$").sql(bind_counter.next().to_string()) - } -} - type BoxedQuery = diesel::query_builder::BoxedSqlQuery< 'static, Pg, diff --git a/nexus/src/app/background/sync_switch_configuration.rs b/nexus/src/app/background/sync_switch_configuration.rs index dc7aa74576..7efe9ef92b 100644 --- a/nexus/src/app/background/sync_switch_configuration.rs +++ b/nexus/src/app/background/sync_switch_configuration.rs @@ -551,7 +551,8 @@ impl BackgroundTask for SwitchPortSettingsManager { // Same thing as above, check to see if we've already built the announce set, // if so we'll skip this step - if bgp_announce_prefixes.get(&bgp_config.bgp_announce_set_id).is_none() { + #[allow(clippy::map_entry)] + if !bgp_announce_prefixes.contains_key(&bgp_config.bgp_announce_set_id) { let announcements = match self .datastore .bgp_announce_list( diff --git a/nexus/src/app/sagas/snapshot_create.rs b/nexus/src/app/sagas/snapshot_create.rs index 2a5deeff51..287571cfd5 100644 --- a/nexus/src/app/sagas/snapshot_create.rs +++ b/nexus/src/app/sagas/snapshot_create.rs @@ -1572,12 +1572,9 @@ fn create_snapshot_from_disk( if let Some(socket_map) = socket_map { for target in &mut opts.target { - *target = socket_map - .get(target) - .ok_or_else(|| { - anyhow!("target {} not found in map!", target) - })? - .clone(); + target.clone_from(socket_map.get(target).ok_or_else( + || anyhow!("target {} not found in map!", target), + )?); } } diff --git a/oximeter/db/src/oxql/ast/table_ops/group_by.rs b/oximeter/db/src/oxql/ast/table_ops/group_by.rs index 3284c70c1f..f40572d762 100644 --- a/oximeter/db/src/oxql/ast/table_ops/group_by.rs +++ b/oximeter/db/src/oxql/ast/table_ops/group_by.rs @@ -496,7 +496,7 @@ mod tests { ) .unwrap(); ts0.points.start_times = None; - ts0.points.timestamps = timestamps.clone(); + ts0.points.timestamps.clone_from(×tamps); *ts0.points.values_mut(0).unwrap() = ValueArray::Double(vec![ Some(1.0), if matches!( diff --git a/oximeter/db/src/oxql/ast/table_ops/limit.rs b/oximeter/db/src/oxql/ast/table_ops/limit.rs index 46d19b9cdc..0205868f5c 100644 --- a/oximeter/db/src/oxql/ast/table_ops/limit.rs +++ b/oximeter/db/src/oxql/ast/table_ops/limit.rs @@ -150,7 +150,7 @@ mod tests { MetricType::Gauge, ) .unwrap(); - timeseries.points.timestamps = timestamps.clone(); + timeseries.points.timestamps.clone_from(×tamps); timeseries.points.values[0].values.as_integer_mut().unwrap().extend([ Some(1), Some(2), @@ -166,7 +166,7 @@ mod tests { MetricType::Gauge, ) .unwrap(); - timeseries.points.timestamps = timestamps.clone(); + timeseries.points.timestamps.clone_from(×tamps); timeseries.points.values[0].values.as_integer_mut().unwrap().extend([ Some(4), Some(5), diff --git a/rust-toolchain.toml b/rust-toolchain.toml index a2ed3895ec..7c513cfbad 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -4,5 +4,5 @@ # # We choose a specific toolchain (rather than "stable") for repeatability. The # intent is to keep this up-to-date with recently-released stable Rust. -channel = "1.77.2" +channel = "1.78.0" profile = "default" diff --git a/sled-agent/src/bootstrap/rss_handle.rs b/sled-agent/src/bootstrap/rss_handle.rs index 5d9c01e7f2..9baf0e7ef3 100644 --- a/sled-agent/src/bootstrap/rss_handle.rs +++ b/sled-agent/src/bootstrap/rss_handle.rs @@ -299,11 +299,3 @@ impl BootstrapAgentHandleReceiver { tx.send(Ok(())).unwrap(); } } - -struct AbortOnDrop(JoinHandle); - -impl Drop for AbortOnDrop { - fn drop(&mut self) { - self.0.abort(); - } -} diff --git a/sled-hardware/src/illumos/mod.rs b/sled-hardware/src/illumos/mod.rs index 0bf2fa6e53..e9a47de29e 100644 --- a/sled-hardware/src/illumos/mod.rs +++ b/sled-hardware/src/illumos/mod.rs @@ -263,7 +263,7 @@ impl HardwareView { updates.push(DiskAdded(disk.clone())); } - self.disks = polled_hw.disks.clone(); + self.disks.clone_from(&polled_hw.disks); } } diff --git a/sled-storage/src/resources.rs b/sled-storage/src/resources.rs index a2e75249b3..b44c8e5b53 100644 --- a/sled-storage/src/resources.rs +++ b/sled-storage/src/resources.rs @@ -347,7 +347,7 @@ impl StorageResources { // This leaves the presence of the disk still in "Self", but // downgrades the disk to an unmanaged status. ManagedDisk::ExplicitlyManaged(disk) => { - if self.control_plane_disks.get(identity).is_none() { + if !self.control_plane_disks.contains_key(identity) { *managed_disk = ManagedDisk::Unmanaged(RawDisk::from(disk.clone())); updated = true; diff --git a/tools/opte_version b/tools/opte_version index 41d9666b04..2de18d2d9b 100644 --- a/tools/opte_version +++ b/tools/opte_version @@ -1 +1 @@ -0.29.248 +0.29.250 diff --git a/wicket/src/ui/defaults/dimensions.rs b/wicket/src/ui/defaults/dimensions.rs index ca76807786..2961400aa7 100644 --- a/wicket/src/ui/defaults/dimensions.rs +++ b/wicket/src/ui/defaults/dimensions.rs @@ -18,14 +18,6 @@ pub trait RectExt { /// /// Panics if `height > self.height`. fn center_vertically(self, height: u16) -> Self; - - /// Create a new maximally sized `Rect` that is bounded by `self`, and - /// shifted down by `y` columns. In order to maintain the bounding, the - /// new `Rect` is originally sized to `self` and then shrunk by the same - /// amount it is shifted downwards: namely `y` columns. - /// - /// Panics if `y > self.height`. - fn move_down_within_bounds(self, y: u16) -> Self; } impl RectExt for Rect { @@ -42,10 +34,4 @@ impl RectExt for Rect { self.height = height; self } - - fn move_down_within_bounds(mut self, y: u16) -> Self { - self.y = self.y + y; - self.height -= y; - self - } } diff --git a/wicketd/src/update_tracker.rs b/wicketd/src/update_tracker.rs index 42853a4076..10253bc2f7 100644 --- a/wicketd/src/update_tracker.rs +++ b/wicketd/src/update_tracker.rs @@ -269,7 +269,7 @@ impl UpdateTracker { // This used to check that the task was finished, but we changed // that in favor of forcing users to clear update state before // starting a new one. - update_data.sp_update_data.get(sp).is_some() + update_data.sp_update_data.contains_key(sp) }) .copied() .collect();