Skip to content

Commit

Permalink
Update for Rust 1.74 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers committed Nov 27, 2023
1 parent 7ab1d35 commit b26f41d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 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
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
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 b26f41d

Please sign in to comment.