build(toolchain): switch Rust channel to stable (#4775)

* Change Rust toolchain channel to stable

Signed-off-by: houseme <housemecn@gmail.com>

* style: apply clippy --fix and cargo fix lint suggestions

Run `cargo clippy --fix --all-targets --all-features` and
`cargo fix --lib --all-targets` across the workspace, then resolve the
remaining warnings by hand:

- collapse needless borrows in `format!` args, prefer `?` over explicit
  early returns, and use `.values()` / `.flatten()` iterator adapters
- rewrite the `Md5` scan loop via `manual_flatten` and re-indent the
  `select!` macro body (rustfmt skips macro interiors)
- annotate the intentional dead-code `Md5` inherent methods (constructed
  only by the test factory) with `#[allow(dead_code)]`

Behavior is unchanged.

Co-Authored-By: heihutu <heihutu@gmail.com>

---------

Signed-off-by: houseme <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
houseme
2026-07-12 18:59:43 +08:00
committed by GitHub
parent a766271246
commit 13bdca6762
22 changed files with 83 additions and 86 deletions
@@ -250,10 +250,9 @@ pub async fn check_object_lock_for_deletion(
let now = objectlock::utc_now_ntp();
let retain_until = if let Some(days) = default_retention.days {
mod_time.saturating_add(time::Duration::days(days as i64))
} else if let Some(years) = default_retention.years {
add_years(mod_time, years)
} else {
return None; // No retention period specified
let years = default_retention.years?;
add_years(mod_time, years)
};
if retain_until.unix_timestamp() > now.unix_timestamp()