mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 16:28:15 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user