From 36428bc490ea4cc0619a728fc36fb9b75ae8f014 Mon Sep 17 00:00:00 2001 From: Zhengchao An Date: Fri, 10 Jul 2026 20:00:22 +0800 Subject: [PATCH] fix(rustfs): allow drop_non_drop on dial9 guard for non-Drop feature sets (#4679) Under feature sets where the dial9 session guard carries no Drop impl (e.g. --features sftp, after #4663), `drop(dial9_guard)` in the startup entrypoint trips clippy::drop_non_drop and fails the sftp Test and Lint job. The drop is an intentional flush point where the guard does implement Drop; annotate it so it compiles clean across all feature combinations. --- rustfs/src/startup_entrypoint.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rustfs/src/startup_entrypoint.rs b/rustfs/src/startup_entrypoint.rs index ac710031c..d858a692a 100644 --- a/rustfs/src/startup_entrypoint.rs +++ b/rustfs/src/startup_entrypoint.rs @@ -37,7 +37,9 @@ pub fn run_process() { // Flush and seal the trace segment before any exit path. `process::exit` // below does not run destructors, and neither does returning from `main` - // for a guard held in a `static`. + // for a guard held in a `static`. Under feature sets where the dial9 guard + // carries no Drop impl (e.g. `--features sftp`), this is an intentional no-op. + #[allow(clippy::drop_non_drop)] drop(dial9_guard); if let Err(ref e) = result {