diff --git a/lib/collection/src/shards/replica_set/read_ops.rs b/lib/collection/src/shards/replica_set/read_ops.rs index 89963c91b9..48b377b76f 100644 --- a/lib/collection/src/shards/replica_set/read_ops.rs +++ b/lib/collection/src/shards/replica_set/read_ops.rs @@ -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, diff --git a/lib/collection/src/shards/transfer/wal_delta.rs b/lib/collection/src/shards/transfer/wal_delta.rs index 83d152aa68..ddbe62c118 100644 --- a/lib/collection/src/shards/transfer/wal_delta.rs +++ b/lib/collection/src/shards/transfer/wal_delta.rs @@ -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, diff --git a/lib/collection/src/update_handler.rs b/lib/collection/src/update_handler.rs index 7d7c8f7432..20df4d4e13 100644 --- a/lib/collection/src/update_handler.rs +++ b/lib/collection/src/update_handler.rs @@ -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), diff --git a/lib/collection/src/update_workers/flush_workers.rs b/lib/collection/src/update_workers/flush_workers.rs index c9ea3c88b6..206a0acf6b 100644 --- a/lib/collection/src/update_workers/flush_workers.rs +++ b/lib/collection/src/update_workers/flush_workers.rs @@ -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, diff --git a/lib/quantization/src/encoded_vectors_binary.rs b/lib/quantization/src/encoded_vectors_binary.rs index b18941cdf4..93a0de9247 100644 --- a/lib/quantization/src/encoded_vectors_binary.rs +++ b/lib/quantization/src/encoded_vectors_binary.rs @@ -1077,7 +1077,6 @@ unsafe extern "C" { ) -> u32; } -#[allow(missing_docs)] #[cfg(target_arch = "x86_64")] #[target_feature(enable = "avx512vl")] #[target_feature(enable = "avx512vpopcntdq")] diff --git a/lib/segment/src/id_tracker/id_tracker_base/read_only_tracker_enum.rs b/lib/segment/src/id_tracker/id_tracker_base/read_only_tracker_enum.rs index 0bcbe07060..b4312bd3d6 100644 --- a/lib/segment/src/id_tracker/id_tracker_base/read_only_tracker_enum.rs +++ b/lib/segment/src/id_tracker/id_tracker_base/read_only_tracker_enum.rs @@ -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 { Appendable(ReadOnlyAppendableIdTracker), Immutable(ReadOnlyImmutableIdTracker), diff --git a/lib/segment/src/id_tracker/id_tracker_base/tracker_enum.rs b/lib/segment/src/id_tracker/id_tracker_base/tracker_enum.rs index a41ec859b5..1538feefe9 100644 --- a/lib/segment/src/id_tracker/id_tracker_base/tracker_enum.rs +++ b/lib/segment/src/id_tracker/id_tracker_base/tracker_enum.rs @@ -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), diff --git a/lib/segment/src/index/field_index/bool_index/read_only_bool_index/mod.rs b/lib/segment/src/index/field_index/bool_index/read_only_bool_index/mod.rs index cc3109b6ce..4b1d32e1cd 100644 --- a/lib/segment/src/index/field_index/bool_index/read_only_bool_index/mod.rs +++ b/lib/segment/src/index/field_index/bool_index/read_only_bool_index/mod.rs @@ -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, diff --git a/lib/segment/src/index/field_index/full_text_index/mutable_text_index/read_only/mod.rs b/lib/segment/src/index/field_index/full_text_index/mutable_text_index/read_only/mod.rs index 76ede46e40..110c324e64 100644 --- a/lib/segment/src/index/field_index/full_text_index/mutable_text_index/read_only/mod.rs +++ b/lib/segment/src/index/field_index/full_text_index/mutable_text_index/read_only/mod.rs @@ -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 { pub(super) inner: MutableFullTextIndexInner, // Read once the lifecycle layer lands; until then the field is held to diff --git a/lib/segment/src/index/field_index/index_selector.rs b/lib/segment/src/index/field_index/index_selector.rs index cac37d7a87..8d7f3a7b3a 100644 --- a/lib/segment/src/index/field_index/index_selector.rs +++ b/lib/segment/src/index/field_index/index_selector.rs @@ -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, diff --git a/lib/segment/src/index/field_index/map_index/immutable_map_index/lifecycle.rs b/lib/segment/src/index/field_index/map_index/immutable_map_index/lifecycle.rs index b99bd9885a..5b1089a9d1 100644 --- a/lib/segment/src/index/field_index/map_index/immutable_map_index/lifecycle.rs +++ b/lib/segment/src/index/field_index/map_index/immutable_map_index/lifecycle.rs @@ -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"); } diff --git a/lib/segment/src/index/field_index/null_index/read_only_null_index/mod.rs b/lib/segment/src/index/field_index/null_index/read_only_null_index/mod.rs index 2b7abf166f..86acb53806 100644 --- a/lib/segment/src/index/field_index/null_index/read_only_null_index/mod.rs +++ b/lib/segment/src/index/field_index/null_index/read_only_null_index/mod.rs @@ -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, diff --git a/lib/segment/src/index/hnsw_index/gpu/gpu_insert_context.rs b/lib/segment/src/index/hnsw_index/gpu/gpu_insert_context.rs index 4e99ffcd08..6d558ff50d 100644 --- a/lib/segment/src/index/hnsw_index/gpu/gpu_insert_context.rs +++ b/lib/segment/src/index/hnsw_index/gpu/gpu_insert_context.rs @@ -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. diff --git a/lib/segment/src/index/hnsw_index/hnsw/gpu_build.rs b/lib/segment/src/index/hnsw_index/hnsw/gpu_build.rs index 2d0ae3669e..803b2dc8a3 100644 --- a/lib/segment/src/index/hnsw_index/hnsw/gpu_build.rs +++ b/lib/segment/src/index/hnsw_index/hnsw/gpu_build.rs @@ -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, diff --git a/lib/segment/src/index/hnsw_index/hnsw/search.rs b/lib/segment/src/index/hnsw_index/hnsw/search.rs index 89d08dbc67..9a98ec01df 100644 --- a/lib/segment/src/index/hnsw_index/hnsw/search.rs +++ b/lib/segment/src/index/hnsw_index/hnsw/search.rs @@ -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, diff --git a/lib/segment/src/index/struct_payload_index/mod.rs b/lib/segment/src/index/struct_payload_index/mod.rs index c80dd4e6b5..179b4c521a 100644 --- a/lib/segment/src/index/struct_payload_index/mod.rs +++ b/lib/segment/src/index/struct_payload_index/mod.rs @@ -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, diff --git a/lib/segment/src/payload_storage/mod.rs b/lib/segment/src/payload_storage/mod.rs index 532a4d651b..9c50187f12 100644 --- a/lib/segment/src/payload_storage/mod.rs +++ b/lib/segment/src/payload_storage/mod.rs @@ -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; diff --git a/lib/segment/src/segment/read_view/mod.rs b/lib/segment/src/segment/read_view/mod.rs index 4826954115..d50a769849 100644 --- a/lib/segment/src/segment/read_view/mod.rs +++ b/lib/segment/src/segment/read_view/mod.rs @@ -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, diff --git a/lib/segment/src/segment/segment_ops.rs b/lib/segment/src/segment/segment_ops.rs index a1279b043e..fbb88ab3a3 100644 --- a/lib/segment/src/segment/segment_ops.rs +++ b/lib/segment/src/segment/segment_ops.rs @@ -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, diff --git a/lib/segment/src/vector_storage/chunked_vectors/mod.rs b/lib/segment/src/vector_storage/chunked_vectors/mod.rs index 38eab6f86c..38f0ddf344 100644 --- a/lib/segment/src/vector_storage/chunked_vectors/mod.rs +++ b/lib/segment/src/vector_storage/chunked_vectors/mod.rs @@ -3,7 +3,6 @@ mod config; mod read; mod write; -#[allow(unused_imports)] pub use read::ChunkedVectorsRead; pub use write::ChunkedVectors; diff --git a/lib/segment/src/vector_storage/chunked_vectors/read.rs b/lib/segment/src/vector_storage/chunked_vectors/read.rs index af96c3e191..8aad3475cd 100644 --- a/lib/segment/src/vector_storage/chunked_vectors/read.rs +++ b/lib/segment/src/vector_storage/chunked_vectors/read.rs @@ -295,7 +295,6 @@ impl ChunkedVectorsRead { } } -#[allow(dead_code)] // pending: read-only vector storage enum will use this fn read_status_len(status_file: &Path) -> OperationResult { let bytes = fs::read(status_file)?; let needed = std::mem::size_of::(); diff --git a/lib/segment/src/vector_storage/mod.rs b/lib/segment/src/vector_storage/mod.rs index d8eec7b7af..e3ea2fd1d1 100644 --- a/lib/segment/src/vector_storage/mod.rs +++ b/lib/segment/src/vector_storage/mod.rs @@ -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; diff --git a/lib/segment/src/vector_storage/quantized/quantized_scorer_builder.rs b/lib/segment/src/vector_storage/quantized/quantized_scorer_builder.rs index ffe2f96a79..da7585bad8 100644 --- a/lib/segment/src/vector_storage/quantized/quantized_scorer_builder.rs +++ b/lib/segment/src/vector_storage/quantized/quantized_scorer_builder.rs @@ -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, diff --git a/lib/segment/tests/integration/hnsw_quantized_search_test.rs b/lib/segment/tests/integration/hnsw_quantized_search_test.rs index 8c76a5ea8b..3dac9893b7 100644 --- a/lib/segment/tests/integration/hnsw_quantized_search_test.rs +++ b/lib/segment/tests/integration/hnsw_quantized_search_test.rs @@ -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], distance: Distance, diff --git a/lib/shard/src/optimizers/config_mismatch_optimizer.rs b/lib/shard/src/optimizers/config_mismatch_optimizer.rs index 13e5b3408c..db939fe2da 100644 --- a/lib/shard/src/optimizers/config_mismatch_optimizer.rs +++ b/lib/shard/src/optimizers/config_mismatch_optimizer.rs @@ -29,7 +29,6 @@ pub struct ConfigMismatchOptimizer { } impl ConfigMismatchOptimizer { - #[allow(clippy::too_many_arguments)] pub fn new( thresholds_config: OptimizerThresholds, segments_path: PathBuf, diff --git a/lib/shard/src/optimizers/indexing_optimizer.rs b/lib/shard/src/optimizers/indexing_optimizer.rs index 7b0182cc3a..79c60ef1b2 100644 --- a/lib/shard/src/optimizers/indexing_optimizer.rs +++ b/lib/shard/src/optimizers/indexing_optimizer.rs @@ -31,7 +31,6 @@ pub struct IndexingOptimizer { } impl IndexingOptimizer { - #[allow(clippy::too_many_arguments)] pub fn new( default_segments_number: usize, thresholds_config: OptimizerThresholds, diff --git a/lib/shard/src/optimizers/merge_optimizer.rs b/lib/shard/src/optimizers/merge_optimizer.rs index 12dde20bf2..983787e17e 100644 --- a/lib/shard/src/optimizers/merge_optimizer.rs +++ b/lib/shard/src/optimizers/merge_optimizer.rs @@ -52,7 +52,6 @@ pub struct MergeOptimizer { } impl MergeOptimizer { - #[allow(clippy::too_many_arguments)] pub fn new( default_segments_number: usize, thresholds_config: OptimizerThresholds, diff --git a/lib/shard/src/optimizers/vacuum_optimizer.rs b/lib/shard/src/optimizers/vacuum_optimizer.rs index 8be3f94eea..693c6e5ef6 100644 --- a/lib/shard/src/optimizers/vacuum_optimizer.rs +++ b/lib/shard/src/optimizers/vacuum_optimizer.rs @@ -33,7 +33,6 @@ pub struct VacuumOptimizer { } impl VacuumOptimizer { - #[allow(clippy::too_many_arguments)] pub fn new( deleted_threshold: f64, min_vectors_number: usize, diff --git a/lib/shard/src/proxy_segment/mod.rs b/lib/shard/src/proxy_segment/mod.rs index 9ab285c632..3358cc2112 100644 --- a/lib/shard/src/proxy_segment/mod.rs +++ b/lib/shard/src/proxy_segment/mod.rs @@ -215,7 +215,6 @@ impl ProxySegment { filter: Option>, deleted_points: impl IntoIterator, ) -> 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), diff --git a/lib/storage/src/content_manager/consensus/consensus_wal.rs b/lib/storage/src/content_manager/consensus/consensus_wal.rs index 748994fc51..eccd2c3bd6 100644 --- a/lib/storage/src/content_manager/consensus/consensus_wal.rs +++ b/lib/storage/src/content_manager/consensus/consensus_wal.rs @@ -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 {}), \ diff --git a/lib/storage/src/content_manager/toc/mod.rs b/lib/storage/src/content_manager/toc/mod.rs index f29f7f8669..26d449093a 100644 --- a/lib/storage/src/content_manager/toc/mod.rs +++ b/lib/storage/src/content_manager/toc/mod.rs @@ -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, diff --git a/src/actix/api/query_api.rs b/src/actix/api/query_api.rs index 250d64b57a..3be6e24907 100644 --- a/src/actix/api/query_api.rs +++ b/src/actix/api/query_api.rs @@ -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, collection: Path, @@ -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, @@ -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, diff --git a/src/actix/api/update_api.rs b/src/actix/api/update_api.rs index 71ed1360aa..7e44b382d8 100644 --- a/src/actix/api/update_api.rs +++ b/src/actix/api/update_api.rs @@ -30,7 +30,6 @@ struct FieldPath { } #[put("/collections/{collection_name}/points")] -#[allow(clippy::too_many_arguments)] async fn upsert_points( dispatcher: web::Data, collection: Path, @@ -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, collection: Path, @@ -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, diff --git a/src/common/query.rs b/src/common/query.rs index f7bfb9d8f3..42b5d1812a 100644 --- a/src/common/query.rs +++ b/src/common/query.rs @@ -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,