Skip to content

chore: bump MSRV to 1.93 and adopt new stdlib helpers#474

Draft
sandersaares wants to merge 2 commits into
mainfrom
msrv-1.93
Draft

chore: bump MSRV to 1.93 and adopt new stdlib helpers#474
sandersaares wants to merge 2 commits into
mainfrom
msrv-1.93

Conversation

@sandersaares
Copy link
Copy Markdown
Member

@sandersaares sandersaares commented Jun 4, 2026

Bumps the workspace MSRV from 1.91 to 1.93 to align with the oldest Rust toolchain supported across Microsoft, and adopts a couple of stdlib helpers that became stable in 1.93.

Commit 1 — chore: bump MSRV to 1.93

  • Cargo.toml: rust-version = "1.93"
  • constants.env: RUST_MSRV=1.93

The workspace was already MSRV-clean on 1.93 — no code changes or new lint suppressions were needed for the bump itself.

Commit 2 — refactor: adopt MSRV 1.93 stdlib improvements

Net: +15 / −96 across 4 files.

Crate Change
data_privacy/src/redaction_engine.rs Replaced two local DebugFormatter / DisplayFormatter ZST wrapper structs with core::fmt::from_fn closures in redacted_debug / redacted_display.
data_privacy_core/src/redacted.rs Replaced the inline Adapter struct in the RedactedToString blanket impl with core::fmt::from_fn.
data_privacy/src/sensitive.rs Replaced three inline Adapter structs in tests with core::fmt::from_fn.
seatbelt/src/breaker/health.rs Replaced the manual while let Some(front) = … front() / pop_front() sliding-window expiry with VecDeque::pop_front_if.

core::fmt::from_fn (stable in 1.93) returns a wrapper that implements both Display and Debug from the same closure, so it cleanly subsumes both adapter patterns.

sandersaares and others added 2 commits June 4, 2026 14:57
Aligns the workspace MSRV with the oldest Rust toolchain supported in Microsoft.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use core::fmt::from_fn (stable in 1.93) to replace single-use

Display/Debug adapter structs in data_privacy and its tests.

Use VecDeque::pop_front_if (stable in 1.93) for sliding-window

expiry in the seatbelt circuit-breaker health metrics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandersaares sandersaares marked this pull request as ready for review June 4, 2026 12:21
Copilot AI review requested due to automatic review settings June 4, 2026 12:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR raises the workspace minimum supported Rust version (MSRV) from 1.91 to 1.93 and then simplifies several formatting adapters / window-expiry loops by adopting stdlib helpers available in Rust 1.93 (core::fmt::from_fn, VecDeque::pop_front_if).

Changes:

  • Bump workspace MSRV to Rust 1.93 in Cargo.toml and constants.env.
  • Replace local Display/Debug adapter structs with core::fmt::from_fn wrappers in data_privacy and data_privacy_core.
  • Simplify VecDeque sliding-window expiry logic using VecDeque::pop_front_if in seatbelt.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Cargo.toml Updates [workspace.package].rust-version to 1.93 (workspace MSRV bump).
constants.env Updates RUST_MSRV to 1.93 to match the workspace MSRV promise.
crates/data_privacy/src/redaction_engine.rs Uses core::fmt::from_fn instead of local ZST formatter wrappers for redacted debug/display output.
crates/data_privacy_core/src/redacted.rs Uses core::fmt::from_fn in the RedactedToString blanket impl instead of an inline adapter struct.
crates/data_privacy/src/sensitive.rs Refactors tests to use core::fmt::from_fn instead of inline adapter structs for redacted formatting snapshots.
crates/seatbelt/src/breaker/health.rs Uses VecDeque::pop_front_if for window expiry instead of manual front() + pop_front() looping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (458971e) to head (7c632d1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #474   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         313      313           
  Lines       24121    24112    -9     
=======================================
- Hits        24121    24112    -9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sandersaares
Copy link
Copy Markdown
Member Author

cargo-check-external-types requires 1.92! Parking this until that gets sorted out - we either need to get that tool update or replace it.

@sandersaares sandersaares marked this pull request as draft June 4, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants