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.
This commit is contained in:
Zhengchao An
2026-07-10 20:00:22 +08:00
committed by GitHub
parent 00536da80c
commit 36428bc490
+3 -1
View File
@@ -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 {