Remove unecesssary Clippy allows (#9267)

This commit is contained in:
Arnaud Gourlay
2026-06-02 16:54:27 +02:00
committed by timvisee
parent 2365d1a3ef
commit 0e2ed93172
34 changed files with 1 additions and 41 deletions

View File

@@ -17,7 +17,6 @@ use crate::operations::types::*;
use crate::operations::universal_query::shard_query::{ShardQueryRequest, ShardQueryResponse};
impl ShardReplicaSet {
#[allow(clippy::too_many_arguments)]
pub async fn scroll_by(
&self,
request: Arc<ScrollRequestInternal>,

View File

@@ -70,7 +70,6 @@ use crate::shards::shard_holder::SharedShardHolder;
///
/// If cancelled - the remote shard may only be partially recovered/transferred and the local shard
/// may be left in an unexpected state. This must be resolved manually in case of cancellation.
#[allow(clippy::too_many_arguments)]
pub(super) async fn transfer_wal_delta(
transfer_config: ShardTransfer,
shard_holder: SharedShardHolder,

View File

@@ -51,7 +51,6 @@ pub struct OperationData {
/// Signal, used to inform Updater process
#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub enum UpdateSignal {
/// Requested operation to perform
Operation(OperationData),

View File

@@ -29,7 +29,6 @@ impl UpdateWorkers {
})
}
#[allow(clippy::too_many_arguments)]
fn flush_worker_internal(
segments: LockedSegmentHolder,
wal: LockedWal,
@@ -99,7 +98,6 @@ impl UpdateWorkers {
}
}
#[allow(clippy::too_many_arguments)]
pub async fn flush_worker_fn(
segments: LockedSegmentHolder,
wal: LockedWal,

View File

@@ -1077,7 +1077,6 @@ unsafe extern "C" {
) -> u32;
}
#[allow(missing_docs)]
#[cfg(target_arch = "x86_64")]
#[target_feature(enable = "avx512vl")]
#[target_feature(enable = "avx512vpopcntdq")]

View File

@@ -7,7 +7,6 @@ use crate::id_tracker::mutable_id_tracker::read_only::ReadOnlyAppendableIdTracke
use crate::id_tracker::{IdTrackerRead, PointMappingsRefEnum};
use crate::types::{PointIdType, SeqNumberType};
#[allow(clippy::large_enum_variant)]
pub enum ReadOnlyIdTrackerEnum<S: UniversalRead> {
Appendable(ReadOnlyAppendableIdTracker),
Immutable(ReadOnlyImmutableIdTracker<S>),

View File

@@ -14,7 +14,6 @@ use crate::id_tracker::mutable_id_tracker::MutableIdTracker;
use crate::types::{PointIdType, SeqNumberType};
#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub enum IdTrackerEnum {
MutableIdTracker(MutableIdTracker),
ImmutableIdTracker(ImmutableIdTracker<MmapFile>),

View File

@@ -22,7 +22,6 @@ mod read_ops;
/// [3]: common::universal_io::UniversalRead
/// [4]: super::read_ops::BoolIndexRead
pub struct ReadOnlyBoolIndex {
#[allow(dead_code)]
pub(super) _base_dir: PathBuf,
pub(super) storage: ReadOnlyStorage,
pub(super) indexed_count: usize,

View File

@@ -15,7 +15,6 @@ mod read_ops;
///
/// Loading / lifecycle (constructor, `files`, `populate`, `clear_cache`, …)
/// will be added in a follow-up; until then the type is not yet constructed.
#[allow(dead_code)]
pub struct ReadOnlyAppendableFullTextIndex<S: UniversalRead> {
pub(super) inner: MutableFullTextIndexInner,
// Read once the lifecycle layer lands; until then the field is held to

View File

@@ -49,7 +49,6 @@ pub struct IndexSelectorGridstore<'a> {
impl IndexSelector<'_> {
/// Loads the correct index based on `index_type`.
#[allow(clippy::too_many_arguments)]
pub fn new_index_with_type(
&self,
field: &JsonPath,

View File

@@ -187,7 +187,6 @@ where
deleted_value_to_points_container.resize(pos + 1, false);
}
#[allow(unused_variables)]
let did_exist = !deleted_value_to_points_container.replace(pos, true);
debug_assert!(did_exist, "value {value} was already deleted");
}

View File

@@ -21,7 +21,6 @@ mod read_ops;
/// [3]: common::universal_io::UniversalRead
/// [4]: super::read_ops::NullIndexRead
pub struct ReadOnlyNullIndex {
#[allow(dead_code)]
pub(super) _base_dir: PathBuf,
pub(super) storage: ReadOnlyStorage,
pub(super) total_point_count: usize,

View File

@@ -96,7 +96,6 @@ impl ShaderBuilderParameters for GpuInsertResources {
}
impl GpuInsertResources {
#[allow(clippy::too_many_arguments)]
pub fn new(
gpu_vector_storage: &GpuVectorStorage,
groups_count: usize,
@@ -180,7 +179,6 @@ impl GpuInsertResources {
}
impl<'a> GpuInsertContext<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
gpu_vector_storage: &'a GpuVectorStorage,
// Parallel inserts count.

View File

@@ -106,7 +106,6 @@ pub(super) fn build_filtered_graph_on_gpu(
)
}
#[allow(clippy::too_many_arguments)]
fn build_graph_on_gpu<'a, 'b>(
gpu_insert_context: Option<&mut GpuInsertContext<'b>>,
graph_layers_builder: &GraphLayersBuilder,

View File

@@ -22,7 +22,6 @@ use crate::vector_storage::query::DiscoverQuery;
use crate::vector_storage::{VectorStorageEnum, VectorStorageRead, new_raw_scorer};
impl HNSWIndex {
#[allow(clippy::too_many_arguments)]
pub(super) fn search_with_graph(
&self,
vector: &QueryVector,

View File

@@ -32,7 +32,6 @@ use crate::types::{PayloadFieldSchema, PayloadKeyType, VectorNameBuf};
use crate::vector_storage::VectorStorageEnum;
#[derive(Debug)]
#[allow(clippy::enum_variant_names)]
enum StorageType {
GridstoreAppendable,
GridstoreNonAppendable,

View File

@@ -8,7 +8,6 @@ pub mod mmap_payload_storage;
mod payload_storage_base;
pub mod payload_storage_enum;
pub mod query_checker;
#[allow(dead_code)]
pub mod read_only;
#[cfg(test)]
mod tests;

View File

@@ -28,7 +28,6 @@ use crate::vector_storage::VectorStorageEnum;
///
/// The motivation for this is to unify the read code between
/// regular `Segment` and `ReadOnlySegment`.
#[allow(unused, dead_code)]
pub struct SegmentReadView<'s, TIdTracker, TPayloadIndex, TPayloadStorage, TVectorData>
where
TIdTracker: IdTrackerRead,
@@ -61,7 +60,6 @@ pub type SegmentReadViewFor<'s> = SegmentReadView<
VectorData,
>;
#[allow(unused, dead_code)]
impl<'s, TIdT, TPI, TPS, TVD> SegmentReadView<'s, TIdT, TPI, TPS, TVD>
where
TIdT: IdTrackerRead,

View File

@@ -75,7 +75,6 @@ impl Segment {
/// # Warning
///
/// Available for appendable segments only.
#[allow(clippy::needless_pass_by_ref_mut)] // ensure single access to AtomicRefCell vector_index
pub(super) fn update_vectors(
&mut self,
internal_id: PointOffsetType,

View File

@@ -3,7 +3,6 @@ mod config;
mod read;
mod write;
#[allow(unused_imports)]
pub use read::ChunkedVectorsRead;
pub use write::ChunkedVectors;

View File

@@ -295,7 +295,6 @@ impl<T: bytemuck::Pod + Send, S: UniversalRead> ChunkedVectorsRead<T, S> {
}
}
#[allow(dead_code)] // pending: read-only vector storage enum will use this
fn read_status_len(status_file: &Path) -> OperationResult<usize> {
let bytes = fs::read(status_file)?;
let needed = std::mem::size_of::<usize>();

View File

@@ -8,7 +8,6 @@ pub mod quantized;
pub mod query;
pub mod query_scorer;
pub mod raw_scorer;
#[allow(dead_code)]
pub mod read_only;
pub mod sparse;
mod vector_storage_base;

View File

@@ -34,7 +34,6 @@ pub(super) struct QuantizedScorerBuilder<'a> {
}
impl<'a> QuantizedScorerBuilder<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
quantized_storage: &'a QuantizedVectorStorage,
quantization_config: &'a QuantizationConfig,

View File

@@ -801,7 +801,7 @@ fn hnsw_quantized_low_bit_compare_test(
/// Caller must keep the returned tempdirs alive for as long as the segment
/// and HNSW index are used.
#[allow(clippy::type_complexity, clippy::too_many_arguments)]
#[allow(clippy::too_many_arguments)]
fn build_quantized_hnsw_for_compare(
vectors: &[Vec<f32>],
distance: Distance,

View File

@@ -29,7 +29,6 @@ pub struct ConfigMismatchOptimizer {
}
impl ConfigMismatchOptimizer {
#[allow(clippy::too_many_arguments)]
pub fn new(
thresholds_config: OptimizerThresholds,
segments_path: PathBuf,

View File

@@ -31,7 +31,6 @@ pub struct IndexingOptimizer {
}
impl IndexingOptimizer {
#[allow(clippy::too_many_arguments)]
pub fn new(
default_segments_number: usize,
thresholds_config: OptimizerThresholds,

View File

@@ -52,7 +52,6 @@ pub struct MergeOptimizer {
}
impl MergeOptimizer {
#[allow(clippy::too_many_arguments)]
pub fn new(
default_segments_number: usize,
thresholds_config: OptimizerThresholds,

View File

@@ -33,7 +33,6 @@ pub struct VacuumOptimizer {
}
impl VacuumOptimizer {
#[allow(clippy::too_many_arguments)]
pub fn new(
deleted_threshold: f64,
min_vectors_number: usize,

View File

@@ -215,7 +215,6 @@ impl ProxySegment {
filter: Option<Cow<'_, Filter>>,
deleted_points: impl IntoIterator<Item = PointIdType>,
) -> Filter {
#[allow(clippy::from_iter_instead_of_collect)]
let wrapper_condition = Condition::HasId(HasIdCondition::from_iter(deleted_points));
match filter {
None => Filter::new_must_not(wrapper_condition),

View File

@@ -194,7 +194,6 @@ impl ConsensusOpWal {
// Check that new entry index is sequential (it's not greater than next WAL index),
// or truncate entries at the tail of WAL, if it overwrites some
#[allow(clippy::comparison_chain)] // stupid ahh diagnostics 🙄
if new_entry_wal_index > next_wal_index {
return Err(StorageError::service_error(format!(
"Can't append entry with Raft index {} (expected WAL index {}), \

View File

@@ -110,7 +110,6 @@ pub struct TableOfContent {
impl TableOfContent {
/// PeerId does not change during execution so it is ok to copy it here.
#[allow(clippy::too_many_arguments)]
pub fn new(
storage_config: &StorageConfig,
optimizer_resource_budget: ResourceBudget,

View File

@@ -28,7 +28,6 @@ use crate::settings::ServiceConfig;
pub const THIS_FILE: &str = file!();
#[post("/collections/{collection_name}/points/query")]
#[allow(clippy::too_many_arguments)]
async fn query_points(
dispatcher: web::Data<Dispatcher>,
collection: Path<CollectionPath>,
@@ -106,7 +105,6 @@ async fn query_points(
)
}
#[allow(clippy::too_many_arguments)]
#[post("/collections/{collection_name}/points/query/batch")]
async fn query_points_batch(
dispatcher: web::Data<Dispatcher>,
@@ -195,7 +193,6 @@ async fn query_points_batch(
)
}
#[allow(clippy::too_many_arguments)]
#[post("/collections/{collection_name}/points/query/groups")]
async fn query_points_groups(
dispatcher: web::Data<Dispatcher>,

View File

@@ -30,7 +30,6 @@ struct FieldPath {
}
#[put("/collections/{collection_name}/points")]
#[allow(clippy::too_many_arguments)]
async fn upsert_points(
dispatcher: web::Data<Dispatcher>,
collection: Path<CollectionPath>,
@@ -111,7 +110,6 @@ async fn delete_points(
}
#[put("/collections/{collection_name}/points/vectors")]
#[allow(clippy::too_many_arguments)]
async fn update_vectors(
dispatcher: web::Data<Dispatcher>,
collection: Path<CollectionPath>,
@@ -323,7 +321,6 @@ async fn clear_payload(
process_response(res, timing, request_hw_counter.to_rest_api())
}
#[allow(clippy::too_many_arguments)]
#[post("/collections/{collection_name}/points/batch")]
async fn update_batch(
dispatcher: web::Data<Dispatcher>,

View File

@@ -295,7 +295,6 @@ pub async fn do_query_points(
.ok_or_else(|| StorageError::service_error("Empty query result"))
}
#[allow(clippy::too_many_arguments)]
pub async fn do_query_batch_points(
toc: &TableOfContent,
collection_name: &str,