mirror of
https://github.com/qdrant/qdrant.git
synced 2026-07-26 20:51:08 -05:00
* Add `#[must_use]` to RAII guard and task handle types These types rely on being held for a scope — dropping them immediately is almost always a bug: - `StoppingGuard`: sets `is_stopped` flag on drop - `UpdateGuard`: decrements update counter on drop - `UpdatesGuard`: releases mutex preventing concurrent updates on drop - `ClockGuard`: marks clock as inactive on drop - `IsAliveGuard`: releases liveness lock on drop - `ScopeTrackerGuard`: decrements scope counter on drop - `CancellableAsyncTaskHandle`: detaches task on drop - `StoppableTaskHandle`: may abort task on drop (AbortOnDropHandle) Made-with: Cursor * Remove redundant function-level #[must_use] now covered by type With ScopeTrackerGuard marked #[must_use] at the type level, the function-level attributes on measure_scope(), measure(), track_create_snapshot_request(), and count_snapshot_creation() are redundant and trigger clippy::double_must_use. Made-with: Cursor --------- Co-authored-by: Cursor Agent <agent@cursor.com>