Skip to content

Commit 9b1b301

Browse files
authored
[meta] update rust toolchain to 1.91.1 (#9522)
Rust 1.92.0 unfortunately runs into rust-lang/rust#147648. Note that we need Rust 1.91.1 specifically for rust-lang/rust#148322, not 1.91.0.
1 parent 2b45e93 commit 9b1b301

File tree

44 files changed

+112
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+112
-115
lines changed

Cargo.lock

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

common/src/api/external/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,16 @@ impl ByteCount {
578578

579579
impl Display for ByteCount {
580580
fn fmt(&self, f: &mut Formatter<'_>) -> FormatResult {
581-
if self.to_bytes() >= TiB && self.to_bytes() % TiB == 0 {
581+
if self.to_bytes() >= TiB && self.to_bytes().is_multiple_of(TiB) {
582582
write!(f, "{} TiB", self.to_whole_tebibytes())
583-
} else if self.to_bytes() >= GiB && self.to_bytes() % GiB == 0 {
583+
} else if self.to_bytes() >= GiB && self.to_bytes().is_multiple_of(GiB)
584+
{
584585
write!(f, "{} GiB", self.to_whole_gibibytes())
585-
} else if self.to_bytes() >= MiB && self.to_bytes() % MiB == 0 {
586+
} else if self.to_bytes() >= MiB && self.to_bytes().is_multiple_of(MiB)
587+
{
586588
write!(f, "{} MiB", self.to_whole_mebibytes())
587-
} else if self.to_bytes() >= KiB && self.to_bytes() % KiB == 0 {
589+
} else if self.to_bytes() >= KiB && self.to_bytes().is_multiple_of(KiB)
590+
{
588591
write!(f, "{} KiB", self.to_whole_kibibytes())
589592
} else {
590593
write!(f, "{} B", self.to_bytes())

common/src/api/internal/shared/external_ip/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl<T: Ip> SourceNatConfig<T> {
195195
first_port: u16,
196196
last_port: u16,
197197
) -> Result<Self, SourceNatConfigError> {
198-
if first_port % NUM_SOURCE_NAT_PORTS == 0
198+
if first_port.is_multiple_of(NUM_SOURCE_NAT_PORTS)
199199
&& last_port
200200
.checked_sub(first_port)
201201
.and_then(|diff| diff.checked_add(1))

common/src/api/internal/shared/external_ip/v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl SourceNatConfig {
7777
first_port: u16,
7878
last_port: u16,
7979
) -> Result<Self, SourceNatConfigError> {
80-
if first_port % NUM_SOURCE_NAT_PORTS == 0
80+
if first_port.is_multiple_of(NUM_SOURCE_NAT_PORTS)
8181
&& last_port
8282
.checked_sub(first_port)
8383
.and_then(|diff| diff.checked_add(1))

illumos-utils/src/vmm_reservoir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ pub fn align_reservoir_size(size_bytes: u64) -> u64 {
6262
}
6363

6464
pub fn reservoir_size_is_aligned(size_bytes: u64) -> bool {
65-
(size_bytes % RESERVOIR_SZ_ALIGN) == 0
65+
size_bytes.is_multiple_of(RESERVOIR_SZ_ALIGN)
6666
}

installinator/src/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ impl WriteTransport for BlockDeviceTransport {
11671167
// When writing to a block device, we must write a multiple of the block
11681168
// size. We can assume the image we're given should be
11691169
// appropriately-sized: return an error here if it is not.
1170-
if total_bytes % block_size != 0 {
1170+
if !total_bytes.is_multiple_of(block_size) {
11711171
return Err(WriteError::WriteError {
11721172
component,
11731173
slot,

nexus/db-queries/src/db/datastore/probe.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,29 +39,9 @@ use omicron_uuid_kinds::GenericUuid as _;
3939
use omicron_uuid_kinds::ProbeUuid;
4040
use omicron_uuid_kinds::SledUuid;
4141
use ref_cast::RefCast;
42-
use schemars::JsonSchema;
43-
use serde::{Deserialize, Serialize};
4442
use sled_agent_client::types::ProbeCreate;
4543
use uuid::Uuid;
4644

47-
#[derive(Debug, Clone, JsonSchema, Serialize, Deserialize)]
48-
#[serde(rename_all = "snake_case")]
49-
pub enum IpKind {
50-
Snat,
51-
Floating,
52-
Ephemeral,
53-
}
54-
55-
impl From<nexus_db_model::IpKind> for IpKind {
56-
fn from(value: nexus_db_model::IpKind) -> Self {
57-
match value {
58-
nexus_db_model::IpKind::SNat => Self::Snat,
59-
nexus_db_model::IpKind::Ephemeral => Self::Ephemeral,
60-
nexus_db_model::IpKind::Floating => Self::Floating,
61-
}
62-
}
63-
}
64-
6545
impl super::DataStore {
6646
/// List the probes for the given project.
6747
pub async fn probe_list(

nexus/db-queries/src/db/datastore/switch_port.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use crate::db::model::{
1515
LldpLinkConfig, Name, SwitchInterfaceConfig, SwitchLinkFec,
1616
SwitchLinkSpeed, SwitchPort, SwitchPortAddressConfig,
1717
SwitchPortBgpPeerConfig, SwitchPortConfig, SwitchPortLinkConfig,
18-
SwitchPortRouteConfig, SwitchPortSettings, SwitchPortSettingsGroup,
19-
SwitchPortSettingsGroups, SwitchVlanInterfaceConfig, TxEqConfig,
18+
SwitchPortRouteConfig, SwitchPortSettings, SwitchPortSettingsGroups,
19+
SwitchVlanInterfaceConfig, TxEqConfig,
2020
};
2121
use crate::db::pagination::paginated;
2222
use async_bb8_diesel::{AsyncRunQueryDsl, Connection};
@@ -149,12 +149,6 @@ impl Into<external::SwitchPortSettings> for SwitchPortSettingsCombinedResult {
149149
}
150150
}
151151

152-
#[derive(Clone, Debug, Deserialize, Serialize)]
153-
pub struct SwitchPortSettingsGroupCreateResult {
154-
pub group: SwitchPortSettingsGroup,
155-
pub settings: SwitchPortSettingsCombinedResult,
156-
}
157-
158152
#[derive(Clone, Debug, Deserialize, Serialize)]
159153
pub struct LinkConfigCombinedResult {
160154
pub port_settings_id: Uuid,

nexus/db-queries/src/db/datastore/vpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ impl DataStore {
438438
}
439439
Err(e) => return Err(e),
440440
Ok(None) => {
441-
crate::probes::vni__search__range__empty!(|| (&id));
441+
crate::probes::vni__search__range__empty!(|| &id);
442442
debug!(
443443
opctx.log,
444444
"No VNIs available within current search range, retrying";

nexus/mgs-updates/src/common_sp_update.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use nexus_types::deployment::PendingMgsUpdate;
1919
use nexus_types::deployment::PendingMgsUpdateDetails;
2020
use nexus_types::inventory::SpType;
2121
use omicron_common::disk::M2Slot;
22-
use slog::error;
2322
use std::net::SocketAddrV6;
2423
use std::time::Duration;
2524
use thiserror::Error;

0 commit comments

Comments
 (0)