Skip to content

Commit

Permalink
Update Rust to v1.74.0 (#4543)
Browse files Browse the repository at this point in the history
Co-authored-by: Rain <[email protected]>
  • Loading branch information
oxide-renovate[bot] and sunshowers authored Nov 28, 2023
1 parent 47968b8 commit f03c7d5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bootstore/src/schemes/v0/request_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl RequestManager {
let expiry = now + self.config.rack_init_timeout;
let mut acks = InitAcks::default();
acks.expected =
packages.keys().cloned().filter(|id| id != &self.id).collect();
packages.keys().filter(|&id| id != &self.id).cloned().collect();
let req = TrackableRequest::InitRack {
rack_uuid,
packages: packages.clone(),
Expand Down
2 changes: 1 addition & 1 deletion common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ impl SemverVersion {
/// This is the official ECMAScript-compatible validation regex for
/// semver:
/// <https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string>
const VALIDATION_REGEX: &str = r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$";
const VALIDATION_REGEX: &'static str = r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$";
}

impl JsonSchema for SemverVersion {
Expand Down
5 changes: 3 additions & 2 deletions illumos-utils/src/running_zone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ mod zenter {
// the contracts used for this come from templates that define becoming
// empty as a critical event.
pub fn contract_reaper(log: Logger) {
const EVENT_PATH: &[u8] = b"/system/contract/process/pbundle";
const EVENT_PATH: &'static [u8] = b"/system/contract/process/pbundle";
const CT_PR_EV_EMPTY: u64 = 1;

let cpath = CString::new(EVENT_PATH).unwrap();
Expand Down Expand Up @@ -327,7 +327,8 @@ mod zenter {
}

impl Template {
const TEMPLATE_PATH: &[u8] = b"/system/contract/process/template\0";
const TEMPLATE_PATH: &'static [u8] =
b"/system/contract/process/template\0";

// Constants related to how the contract below is managed. See
// `usr/src/uts/common/sys/contract/process.h` in the illumos sources
Expand Down
7 changes: 4 additions & 3 deletions nexus/db-queries/src/db/queries/volume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,11 @@ pub struct DecreaseCrucibleResourceCountAndSoftDeleteVolume {
}

impl DecreaseCrucibleResourceCountAndSoftDeleteVolume {
const UPDATED_REGION_SNAPSHOTS_TABLE: &str = "updated_region_snapshots";
const REGION_SNAPSHOTS_TO_CLEAN_UP_TABLE: &str =
const UPDATED_REGION_SNAPSHOTS_TABLE: &'static str =
"updated_region_snapshots";
const REGION_SNAPSHOTS_TO_CLEAN_UP_TABLE: &'static str =
"region_snapshots_to_clean_up";
const UPDATED_VOLUME_TABLE: &str = "updated_volume";
const UPDATED_VOLUME_TABLE: &'static str = "updated_volume";

pub fn new(volume_id: Uuid, snapshot_addrs: Vec<String>) -> Self {
Self {
Expand Down
3 changes: 1 addition & 2 deletions nexus/db-queries/src/db/saga_recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ where
.await
});

let mut completion_futures = vec![];
completion_futures.reserve(recovery_futures.len());
let mut completion_futures = Vec::with_capacity(recovery_futures.len());
// Loads and resumes all sagas in serial.
for recovery_future in recovery_futures {
let saga_complete_future = recovery_future.await?;
Expand Down
4 changes: 2 additions & 2 deletions oximeter/instruments/src/kstat/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ mod tests {
}

impl TestEtherstub {
const PFEXEC: &str = "/usr/bin/pfexec";
const DLADM: &str = "/usr/sbin/dladm";
const PFEXEC: &'static str = "/usr/bin/pfexec";
const DLADM: &'static str = "/usr/sbin/dladm";
fn new() -> Self {
let name = format!(
"kstest{}0",
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.73.0"
channel = "1.74.0"
profile = "default"
2 changes: 1 addition & 1 deletion wicket/src/ui/widgets/popup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ pub fn draw_buttons(
let button_rects = Layout::default()
.direction(Direction::Horizontal)
.horizontal_margin(2)
.constraints(constraints.as_ref())
.constraints(constraints)
.split(rect);

let block = Block::default()
Expand Down

0 comments on commit f03c7d5

Please sign in to comment.