From 63091459d8b844bc3c4deb053ba03e34d3d41fcc Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 10 Mar 2025 13:38:30 -0600 Subject: [PATCH] Allow too many arguments (#26375) This is nearly half of our #allows, and seems like something we happily break whenever we need Release Notes: - N/A --- Cargo.toml | 4 +++ crates/assistant/src/inline_assistant.rs | 3 -- .../src/terminal_inline_assistant.rs | 1 - crates/assistant2/src/context_strip.rs | 1 - crates/assistant2/src/inline_assistant.rs | 3 -- crates/assistant2/src/inline_prompt_editor.rs | 2 -- .../assistant_context_editor/src/context.rs | 2 -- .../src/context_editor.rs | 2 -- .../src/slash_command.rs | 1 - .../src/assistant_slash_command.rs | 1 - crates/buffer_diff/src/buffer_diff.rs | 1 - crates/collab/src/db/queries/messages.rs | 1 - crates/collab/src/db/queries/users.rs | 1 - crates/collab/src/llm/db/queries/usages.rs | 2 -- crates/collab/src/llm/token.rs | 1 - crates/collab/src/rpc.rs | 2 -- .../src/tests/randomized_test_helpers.rs | 1 - crates/collab_ui/src/collab_panel.rs | 1 - crates/editor/src/display_map.rs | 1 - crates/editor/src/display_map/block_map.rs | 1 - crates/editor/src/editor.rs | 7 ----- crates/editor/src/element.rs | 30 ------------------- crates/editor/src/scroll.rs | 2 -- crates/evals/src/eval.rs | 1 - crates/extension_api/src/extension_api.rs | 1 - crates/extension_host/src/extension_host.rs | 1 - crates/file_finder/src/file_finder.rs | 1 - crates/fuzzy/src/matcher.rs | 1 - .../gpui/src/platform/linux/wayland/window.rs | 1 - crates/gpui/src/platform/linux/x11/window.rs | 2 -- crates/gpui/src/text_system/line.rs | 1 - crates/language/src/syntax_map.rs | 1 - crates/lsp/src/lsp.rs | 2 -- crates/multi_buffer/src/multi_buffer.rs | 1 - crates/outline_panel/src/outline_panel.rs | 5 ---- crates/project/src/lsp_store.rs | 6 ---- crates/project/src/project.rs | 1 - crates/remote/src/ssh_session.rs | 1 - crates/rich_text/src/rich_text.rs | 1 - crates/semantic_index/src/worktree_index.rs | 1 - crates/terminal/src/terminal.rs | 1 - crates/terminal_view/src/terminal_element.rs | 1 - crates/title_bar/src/collab.rs | 1 - .../src/toolchain_selector.rs | 2 -- crates/workspace/src/pane.rs | 2 -- crates/workspace/src/pane_group.rs | 5 ---- crates/workspace/src/workspace.rs | 2 -- crates/zeta/src/zeta.rs | 2 -- 48 files changed, 4 insertions(+), 111 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d85c7ef826..bde3d408e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -751,5 +751,9 @@ new_ret_no_self = { level = "allow" } should_implement_trait = { level = "allow" } let_underscore_future = "allow" +# in Rust it can be very tedious to reduce argument count without +# running afoul of the borrow checker. +too_many_arguments = "allow" + [workspace.metadata.cargo-machete] ignored = ["bindgen", "cbindgen", "prost_build", "serde", "component", "linkme"] diff --git a/crates/assistant/src/inline_assistant.rs b/crates/assistant/src/inline_assistant.rs index 7b7f83f315..7bf10d4a67 100644 --- a/crates/assistant/src/inline_assistant.rs +++ b/crates/assistant/src/inline_assistant.rs @@ -386,7 +386,6 @@ impl InlineAssistant { } } - #[allow(clippy::too_many_arguments)] pub fn suggest_assist( &mut self, editor: &Entity, @@ -1674,7 +1673,6 @@ impl Focusable for PromptEditor { impl PromptEditor { const MAX_LINES: u8 = 8; - #[allow(clippy::too_many_arguments)] fn new( id: InlineAssistId, gutter_dimensions: Arc>, @@ -2333,7 +2331,6 @@ struct InlineAssist { } impl InlineAssist { - #[allow(clippy::too_many_arguments)] fn new( assist_id: InlineAssistId, group_id: InlineAssistGroupId, diff --git a/crates/assistant/src/terminal_inline_assistant.rs b/crates/assistant/src/terminal_inline_assistant.rs index 61afcb3abe..ba9a73b58e 100644 --- a/crates/assistant/src/terminal_inline_assistant.rs +++ b/crates/assistant/src/terminal_inline_assistant.rs @@ -702,7 +702,6 @@ impl Focusable for PromptEditor { impl PromptEditor { const MAX_LINES: u8 = 8; - #[allow(clippy::too_many_arguments)] fn new( id: TerminalInlineAssistId, prompt_history: VecDeque, diff --git a/crates/assistant2/src/context_strip.rs b/crates/assistant2/src/context_strip.rs index 2baabf4b56..948ebcc852 100644 --- a/crates/assistant2/src/context_strip.rs +++ b/crates/assistant2/src/context_strip.rs @@ -36,7 +36,6 @@ pub struct ContextStrip { } impl ContextStrip { - #[allow(clippy::too_many_arguments)] pub fn new( context_store: Entity, workspace: WeakEntity, diff --git a/crates/assistant2/src/inline_assistant.rs b/crates/assistant2/src/inline_assistant.rs index 5b15794d49..74b8e49b8b 100644 --- a/crates/assistant2/src/inline_assistant.rs +++ b/crates/assistant2/src/inline_assistant.rs @@ -480,7 +480,6 @@ impl InlineAssistant { } } - #[allow(clippy::too_many_arguments)] pub fn suggest_assist( &mut self, editor: &Entity, @@ -1451,7 +1450,6 @@ struct InlineAssistScrollLock { } impl EditorInlineAssists { - #[allow(clippy::too_many_arguments)] fn new(editor: &Entity, window: &mut Window, cx: &mut App) -> Self { let (highlight_updates_tx, mut highlight_updates_rx) = async_watch::channel(()); Self { @@ -1563,7 +1561,6 @@ pub struct InlineAssist { } impl InlineAssist { - #[allow(clippy::too_many_arguments)] fn new( assist_id: InlineAssistId, group_id: InlineAssistGroupId, diff --git a/crates/assistant2/src/inline_prompt_editor.rs b/crates/assistant2/src/inline_prompt_editor.rs index 4a3757d920..d11a02be01 100644 --- a/crates/assistant2/src/inline_prompt_editor.rs +++ b/crates/assistant2/src/inline_prompt_editor.rs @@ -816,7 +816,6 @@ impl InlineAssistId { } impl PromptEditor { - #[allow(clippy::too_many_arguments)] pub fn new_buffer( id: InlineAssistId, gutter_dimensions: Arc>, @@ -976,7 +975,6 @@ impl TerminalInlineAssistId { } impl PromptEditor { - #[allow(clippy::too_many_arguments)] pub fn new_terminal( id: TerminalInlineAssistId, prompt_history: VecDeque, diff --git a/crates/assistant_context_editor/src/context.rs b/crates/assistant_context_editor/src/context.rs index cac5910d0e..5431ee9081 100644 --- a/crates/assistant_context_editor/src/context.rs +++ b/crates/assistant_context_editor/src/context.rs @@ -647,7 +647,6 @@ impl AssistantContext { ) } - #[allow(clippy::too_many_arguments)] pub fn new( id: ContextId, replica_id: ReplicaId, @@ -768,7 +767,6 @@ impl AssistantContext { } } - #[allow(clippy::too_many_arguments)] pub fn deserialize( saved_context: SavedContext, path: PathBuf, diff --git a/crates/assistant_context_editor/src/context_editor.rs b/crates/assistant_context_editor/src/context_editor.rs index 98ba2db84f..72b4467015 100644 --- a/crates/assistant_context_editor/src/context_editor.rs +++ b/crates/assistant_context_editor/src/context_editor.rs @@ -535,7 +535,6 @@ impl ContextEditor { } } - #[allow(clippy::too_many_arguments)] pub fn run_command( &mut self, command_range: Range, @@ -2057,7 +2056,6 @@ impl ContextEditor { .unwrap_or_else(|| Cow::Borrowed(DEFAULT_TAB_TITLE)) } - #[allow(clippy::too_many_arguments)] fn render_patch_block( &mut self, range: Range, diff --git a/crates/assistant_context_editor/src/slash_command.rs b/crates/assistant_context_editor/src/slash_command.rs index fde6816e45..4ca1a9fd78 100644 --- a/crates/assistant_context_editor/src/slash_command.rs +++ b/crates/assistant_context_editor/src/slash_command.rs @@ -134,7 +134,6 @@ impl SlashCommandCompletionProvider { }) } - #[allow(clippy::too_many_arguments)] fn complete_command_argument( &self, command_name: &str, diff --git a/crates/assistant_slash_command/src/assistant_slash_command.rs b/crates/assistant_slash_command/src/assistant_slash_command.rs index f3811dfa8c..ab5f9dad4a 100644 --- a/crates/assistant_slash_command/src/assistant_slash_command.rs +++ b/crates/assistant_slash_command/src/assistant_slash_command.rs @@ -88,7 +88,6 @@ pub trait SlashCommand: 'static + Send + Sync { fn accepts_arguments(&self) -> bool { self.requires_argument() } - #[allow(clippy::too_many_arguments)] fn run( self: Arc, arguments: &[String], diff --git a/crates/buffer_diff/src/buffer_diff.rs b/crates/buffer_diff/src/buffer_diff.rs index b69161b7e5..9dfddf54f7 100644 --- a/crates/buffer_diff/src/buffer_diff.rs +++ b/crates/buffer_diff/src/buffer_diff.rs @@ -828,7 +828,6 @@ impl BufferDiff { Some(start..end) } - #[allow(clippy::too_many_arguments)] pub async fn update_diff( this: Entity, buffer: text::BufferSnapshot, diff --git a/crates/collab/src/db/queries/messages.rs b/crates/collab/src/db/queries/messages.rs index bc82120a42..e4f6e0f497 100644 --- a/crates/collab/src/db/queries/messages.rs +++ b/crates/collab/src/db/queries/messages.rs @@ -229,7 +229,6 @@ impl Database { } /// Creates a new channel message. - #[allow(clippy::too_many_arguments)] pub async fn create_channel_message( &self, channel_id: ChannelId, diff --git a/crates/collab/src/db/queries/users.rs b/crates/collab/src/db/queries/users.rs index 02958556b7..6e333092e9 100644 --- a/crates/collab/src/db/queries/users.rs +++ b/crates/collab/src/db/queries/users.rs @@ -122,7 +122,6 @@ impl Database { .await } - #[allow(clippy::too_many_arguments)] pub async fn get_or_create_user_by_github_account_tx( &self, github_login: &str, diff --git a/crates/collab/src/llm/db/queries/usages.rs b/crates/collab/src/llm/db/queries/usages.rs index 27e8039f54..c6094752f9 100644 --- a/crates/collab/src/llm/db/queries/usages.rs +++ b/crates/collab/src/llm/db/queries/usages.rs @@ -289,7 +289,6 @@ impl LlmDatabase { .await } - #[allow(clippy::too_many_arguments)] pub async fn record_usage( &self, user_id: UserId, @@ -554,7 +553,6 @@ impl LlmDatabase { .await } - #[allow(clippy::too_many_arguments)] async fn update_usage_for_measure( &self, user_id: UserId, diff --git a/crates/collab/src/llm/token.rs b/crates/collab/src/llm/token.rs index 5629beb322..46704e8efe 100644 --- a/crates/collab/src/llm/token.rs +++ b/crates/collab/src/llm/token.rs @@ -33,7 +33,6 @@ pub struct LlmTokenClaims { const LLM_TOKEN_LIFETIME: Duration = Duration::from_secs(60 * 60); impl LlmTokenClaims { - #[allow(clippy::too_many_arguments)] pub fn create( user: &user::Model, is_staff: bool, diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs index febfe8a231..0057bafee7 100644 --- a/crates/collab/src/rpc.rs +++ b/crates/collab/src/rpc.rs @@ -697,7 +697,6 @@ impl Server { }) } - #[allow(clippy::too_many_arguments)] pub fn handle_connection( self: &Arc, connection: Connection, @@ -1081,7 +1080,6 @@ pub fn routes(server: Arc) -> Router<(), Body> { .layer(Extension(server)) } -#[allow(clippy::too_many_arguments)] pub async fn handle_websocket_request( TypedHeader(ProtocolVersion(protocol_version)): TypedHeader, app_version_header: Option>, diff --git a/crates/collab/src/tests/randomized_test_helpers.rs b/crates/collab/src/tests/randomized_test_helpers.rs index aee83f0411..773d31fc3b 100644 --- a/crates/collab/src/tests/randomized_test_helpers.rs +++ b/crates/collab/src/tests/randomized_test_helpers.rs @@ -463,7 +463,6 @@ impl TestPlan { }) } - #[allow(clippy::too_many_arguments)] async fn apply_server_operation( plan: Arc>, deterministic: BackgroundExecutor, diff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rs index cbbb6e0e80..041e36be98 100644 --- a/crates/collab_ui/src/collab_panel.rs +++ b/crates/collab_ui/src/collab_panel.rs @@ -869,7 +869,6 @@ impl CollabPanel { }) } - #[allow(clippy::too_many_arguments)] fn render_participant_project( &self, project_id: u64, diff --git a/crates/editor/src/display_map.rs b/crates/editor/src/display_map.rs index 5a5df832fb..11615f2f0a 100644 --- a/crates/editor/src/display_map.rs +++ b/crates/editor/src/display_map.rs @@ -113,7 +113,6 @@ pub struct DisplayMap { } impl DisplayMap { - #[allow(clippy::too_many_arguments)] pub fn new( buffer: Entity, font: Font, diff --git a/crates/editor/src/display_map/block_map.rs b/crates/editor/src/display_map/block_map.rs index 9c4da5929b..ab8b87b0ad 100644 --- a/crates/editor/src/display_map/block_map.rs +++ b/crates/editor/src/display_map/block_map.rs @@ -726,7 +726,6 @@ impl BlockMap { self.show_excerpt_controls } - #[allow(clippy::too_many_arguments)] fn header_and_footer_blocks<'a, R, T>( show_excerpt_controls: bool, excerpt_footer_height: u32, diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 0664a6ea84..0a20aee029 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -5931,7 +5931,6 @@ impl Editor { const EDIT_PREDICTION_POPOVER_PADDING_X: Pixels = Pixels(24.); const EDIT_PREDICTION_POPOVER_PADDING_Y: Pixels = Pixels(2.); - #[allow(clippy::too_many_arguments)] fn render_edit_prediction_popover( &mut self, text_bounds: &Bounds, @@ -6043,7 +6042,6 @@ impl Editor { } } - #[allow(clippy::too_many_arguments)] fn render_edit_prediction_modifier_jump_popover( &mut self, text_bounds: &Bounds, @@ -6139,7 +6137,6 @@ impl Editor { Some((element, origin)) } - #[allow(clippy::too_many_arguments)] fn render_edit_prediction_scroll_popover( &mut self, to_y: impl Fn(Size) -> Pixels, @@ -6170,7 +6167,6 @@ impl Editor { Some((element, origin)) } - #[allow(clippy::too_many_arguments)] fn render_edit_prediction_eager_jump_popover( &mut self, text_bounds: &Bounds, @@ -6240,7 +6236,6 @@ impl Editor { } } - #[allow(clippy::too_many_arguments)] fn render_edit_prediction_end_of_line_popover( self: &mut Editor, label: &'static str, @@ -6299,7 +6294,6 @@ impl Editor { Some((element, origin)) } - #[allow(clippy::too_many_arguments)] fn render_edit_prediction_diff_popover( self: &Editor, text_bounds: &Bounds, @@ -6607,7 +6601,6 @@ impl Editor { editor_bg_color.blend(accent_color.opacity(0.6)) } - #[allow(clippy::too_many_arguments)] fn render_edit_prediction_cursor_popover( &self, min_width: Pixels, diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 37fc451a6a..5ce9cdb2bf 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -958,7 +958,6 @@ impl EditorElement { cx.notify() } - #[allow(clippy::too_many_arguments)] fn layout_selections( &self, start_anchor: Anchor, @@ -1130,7 +1129,6 @@ impl EditorElement { cursors } - #[allow(clippy::too_many_arguments)] fn layout_visible_cursors( &self, snapshot: &EditorSnapshot, @@ -1484,7 +1482,6 @@ impl EditorElement { axis_pair(horizontal_scrollbar, vertical_scrollbar) } - #[allow(clippy::too_many_arguments)] fn prepaint_crease_toggles( &self, crease_toggles: &mut [Option], @@ -1519,7 +1516,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn prepaint_crease_trailers( &self, trailers: Vec>, @@ -1596,7 +1592,6 @@ impl EditorElement { display_hunks } - #[allow(clippy::too_many_arguments)] fn layout_inline_diagnostics( &self, line_layouts: &[LineWithInvisibles], @@ -1747,7 +1742,6 @@ impl EditorElement { elements } - #[allow(clippy::too_many_arguments)] fn layout_inline_blame( &self, display_row: DisplayRow, @@ -1827,7 +1821,6 @@ impl EditorElement { Some(element) } - #[allow(clippy::too_many_arguments)] fn layout_blame_entries( &self, buffer_rows: &[RowInfo], @@ -1896,7 +1889,6 @@ impl EditorElement { Some(shaped_lines) } - #[allow(clippy::too_many_arguments)] fn layout_indent_guides( &self, content_origin: gpui::Point, @@ -2014,7 +2006,6 @@ impl EditorElement { (offset_y, length) } - #[allow(clippy::too_many_arguments)] fn layout_run_indicators( &self, line_height: Pixels, @@ -2108,7 +2099,6 @@ impl EditorElement { }) } - #[allow(clippy::too_many_arguments)] fn layout_code_actions_indicator( &self, line_height: Pixels, @@ -2207,7 +2197,6 @@ impl EditorElement { relative_rows } - #[allow(clippy::too_many_arguments)] fn layout_line_numbers( &self, gutter_hitbox: Option<&Hitbox>, @@ -2423,7 +2412,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn prepaint_lines( &self, start_row: DisplayRow, @@ -2450,7 +2438,6 @@ impl EditorElement { line_elements } - #[allow(clippy::too_many_arguments)] fn render_block( &self, block: &Block, @@ -2950,7 +2937,6 @@ impl EditorElement { })) } - #[allow(clippy::too_many_arguments)] fn render_blocks( &self, rows: Range, @@ -3135,7 +3121,6 @@ impl EditorElement { /// Returns true if any of the blocks changed size since the previous frame. This will trigger /// a restart of rendering for the editor based on the new sizes. - #[allow(clippy::too_many_arguments)] fn layout_blocks( &self, blocks: &mut Vec, @@ -3179,7 +3164,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn layout_sticky_buffer_header( &self, StickyHeaderExcerpt { @@ -3254,7 +3238,6 @@ impl EditorElement { header } - #[allow(clippy::too_many_arguments)] fn layout_cursor_popovers( &self, line_height: Pixels, @@ -3443,7 +3426,6 @@ impl EditorElement { ); } - #[allow(clippy::too_many_arguments)] fn layout_gutter_menu( &self, line_height: Pixels, @@ -3496,7 +3478,6 @@ impl EditorElement { ); } - #[allow(clippy::too_many_arguments)] fn layout_popovers_above_or_below_line( &self, target_position: gpui::Point, @@ -3610,7 +3591,6 @@ impl EditorElement { }) } - #[allow(clippy::too_many_arguments)] fn layout_context_menu_aside( &self, y_flipped: bool, @@ -3806,7 +3786,6 @@ impl EditorElement { }) } - #[allow(clippy::too_many_arguments)] fn layout_hover_popovers( &self, snapshot: &EditorSnapshot, @@ -3923,7 +3902,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn layout_diff_hunk_controls( &self, row_range: Range, @@ -4008,7 +3986,6 @@ impl EditorElement { controls } - #[allow(clippy::too_many_arguments)] fn layout_signature_help( &self, hitbox: &Hitbox, @@ -5304,7 +5281,6 @@ impl EditorElement { }); } - #[allow(clippy::too_many_arguments)] fn paint_highlighted_range( &self, range: Range, @@ -5730,7 +5706,6 @@ impl AcceptEditPredictionBinding { } } -#[allow(clippy::too_many_arguments)] fn prepaint_gutter_button( button: IconButton, row: DisplayRow, @@ -5981,7 +5956,6 @@ impl fmt::Debug for LineFragment { } impl LineWithInvisibles { - #[allow(clippy::too_many_arguments)] fn from_chunks<'a>( chunks: impl Iterator>, editor_style: &EditorStyle, @@ -6186,7 +6160,6 @@ impl LineWithInvisibles { layouts } - #[allow(clippy::too_many_arguments)] fn prepaint( &mut self, line_height: Pixels, @@ -6221,7 +6194,6 @@ impl LineWithInvisibles { } } - #[allow(clippy::too_many_arguments)] fn draw( &self, layout: &EditorLayout, @@ -6265,7 +6237,6 @@ impl LineWithInvisibles { ); } - #[allow(clippy::too_many_arguments)] fn draw_invisibles( &self, selection_ranges: &[Range], @@ -7659,7 +7630,6 @@ struct ScrollbarRangeData { } impl ScrollbarRangeData { - #[allow(clippy::too_many_arguments)] pub fn new( scrollbar_bounds: Bounds, letter_size: Size, diff --git a/crates/editor/src/scroll.rs b/crates/editor/src/scroll.rs index a661fd7622..0ba1fde0ab 100644 --- a/crates/editor/src/scroll.rs +++ b/crates/editor/src/scroll.rs @@ -223,7 +223,6 @@ impl ScrollManager { self.anchor.scroll_position(snapshot) } - #[allow(clippy::too_many_arguments)] fn set_scroll_position( &mut self, scroll_position: gpui::Point, @@ -298,7 +297,6 @@ impl ScrollManager { ); } - #[allow(clippy::too_many_arguments)] fn set_anchor( &mut self, anchor: ScrollAnchor, diff --git a/crates/evals/src/eval.rs b/crates/evals/src/eval.rs index 911637aa34..5953bd4c11 100644 --- a/crates/evals/src/eval.rs +++ b/crates/evals/src/eval.rs @@ -399,7 +399,6 @@ async fn run_evaluation( } } -#[allow(clippy::too_many_arguments)] async fn run_eval_project( evaluation_project: EvaluationProject, user_store: &Entity, diff --git a/crates/extension_api/src/extension_api.rs b/crates/extension_api/src/extension_api.rs index 4351761022..e8076f9ea7 100644 --- a/crates/extension_api/src/extension_api.rs +++ b/crates/extension_api/src/extension_api.rs @@ -195,7 +195,6 @@ static mut EXTENSION: Option> = None; pub static ZED_API_VERSION: [u8; 6] = *include_bytes!(concat!(env!("OUT_DIR"), "/version_bytes")); mod wit { - #![allow(clippy::too_many_arguments, clippy::missing_safety_doc)] wit_bindgen::generate!({ skip: ["init-extension"], diff --git a/crates/extension_host/src/extension_host.rs b/crates/extension_host/src/extension_host.rs index 6bc6b0468b..bd438aa2c8 100644 --- a/crates/extension_host/src/extension_host.rs +++ b/crates/extension_host/src/extension_host.rs @@ -218,7 +218,6 @@ impl ExtensionStore { cx.global::().0.clone() } - #[allow(clippy::too_many_arguments)] pub fn new( extensions_dir: PathBuf, build_dir: Option, diff --git a/crates/file_finder/src/file_finder.rs b/crates/file_finder/src/file_finder.rs index 0df1c4d0c7..0584a0155e 100644 --- a/crates/file_finder/src/file_finder.rs +++ b/crates/file_finder/src/file_finder.rs @@ -653,7 +653,6 @@ impl FileSearchQuery { } impl FileFinderDelegate { - #[allow(clippy::too_many_arguments)] fn new( file_finder: WeakEntity, workspace: WeakEntity, diff --git a/crates/fuzzy/src/matcher.rs b/crates/fuzzy/src/matcher.rs index 5e520eccb7..44fd89c966 100644 --- a/crates/fuzzy/src/matcher.rs +++ b/crates/fuzzy/src/matcher.rs @@ -170,7 +170,6 @@ impl<'a> Matcher<'a> { score } - #[allow(clippy::too_many_arguments)] fn recursive_score_match( &mut self, path: &[char], diff --git a/crates/gpui/src/platform/linux/wayland/window.rs b/crates/gpui/src/platform/linux/wayland/window.rs index 4cdc8929a5..a51e7933b8 100644 --- a/crates/gpui/src/platform/linux/wayland/window.rs +++ b/crates/gpui/src/platform/linux/wayland/window.rs @@ -115,7 +115,6 @@ pub struct WaylandWindowStatePtr { } impl WaylandWindowState { - #[allow(clippy::too_many_arguments)] pub(crate) fn new( handle: AnyWindowHandle, surface: wl_surface::WlSurface, diff --git a/crates/gpui/src/platform/linux/x11/window.rs b/crates/gpui/src/platform/linux/x11/window.rs index 935de8b1d8..0917d8bea4 100644 --- a/crates/gpui/src/platform/linux/x11/window.rs +++ b/crates/gpui/src/platform/linux/x11/window.rs @@ -353,7 +353,6 @@ where } impl X11WindowState { - #[allow(clippy::too_many_arguments)] pub fn new( handle: AnyWindowHandle, client: X11ClientStatePtr, @@ -712,7 +711,6 @@ enum WmHintPropertyState { } impl X11Window { - #[allow(clippy::too_many_arguments)] pub fn new( handle: AnyWindowHandle, client: X11ClientStatePtr, diff --git a/crates/gpui/src/text_system/line.rs b/crates/gpui/src/text_system/line.rs index 27da7d66c5..679cc1f1ba 100644 --- a/crates/gpui/src/text_system/line.rs +++ b/crates/gpui/src/text_system/line.rs @@ -132,7 +132,6 @@ impl WrappedLine { } } -#[allow(clippy::too_many_arguments)] fn paint_line( origin: Point, layout: &LineLayout, diff --git a/crates/language/src/syntax_map.rs b/crates/language/src/syntax_map.rs index bbdf2cf2c8..85107a530b 100644 --- a/crates/language/src/syntax_map.rs +++ b/crates/language/src/syntax_map.rs @@ -1250,7 +1250,6 @@ fn parse_text( }) } -#[allow(clippy::too_many_arguments)] fn get_injections( config: &InjectionConfig, text: &BufferSnapshot, diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index 961bb523f9..132a67b5b7 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -301,7 +301,6 @@ pub struct AdapterServerCapabilities { impl LanguageServer { /// Starts a language server process. - #[allow(clippy::too_many_arguments)] pub fn new( stderr_capture: Arc>>, server_id: LanguageServerId, @@ -372,7 +371,6 @@ impl LanguageServer { Ok(server) } - #[allow(clippy::too_many_arguments)] fn new_internal( server_id: LanguageServerId, server_name: LanguageServerName, diff --git a/crates/multi_buffer/src/multi_buffer.rs b/crates/multi_buffer/src/multi_buffer.rs index 8f7a30e3a1..d9a00dcbed 100644 --- a/crates/multi_buffer/src/multi_buffer.rs +++ b/crates/multi_buffer/src/multi_buffer.rs @@ -2982,7 +2982,6 @@ impl MultiBuffer { snapshot.check_invariants(); } - #[allow(clippy::too_many_arguments)] fn recompute_diff_transforms_for_edit( &self, edit: &Edit>, diff --git a/crates/outline_panel/src/outline_panel.rs b/crates/outline_panel/src/outline_panel.rs index 3e1d39564a..29dcb07de2 100644 --- a/crates/outline_panel/src/outline_panel.rs +++ b/crates/outline_panel/src/outline_panel.rs @@ -2360,7 +2360,6 @@ impl OutlinePanel { ) } - #[allow(clippy::too_many_arguments)] fn render_search_match( &mut self, multi_buffer_snapshot: Option<&MultiBufferSnapshot>, @@ -2452,7 +2451,6 @@ impl OutlinePanel { )) } - #[allow(clippy::too_many_arguments)] fn entry_element( &self, rendered_entry: PanelEntry, @@ -3836,7 +3834,6 @@ impl OutlinePanel { }) } - #[allow(clippy::too_many_arguments)] fn push_entry( &self, state: &mut GenerationState, @@ -4054,7 +4051,6 @@ impl OutlinePanel { update_cached_entries } - #[allow(clippy::too_many_arguments)] fn add_excerpt_entries( &self, state: &mut GenerationState, @@ -4113,7 +4109,6 @@ impl OutlinePanel { } } - #[allow(clippy::too_many_arguments)] fn add_search_entries( &mut self, state: &mut GenerationState, diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index b55d8f86dc..5b2602601f 100644 --- a/crates/project/src/lsp_store.rs +++ b/crates/project/src/lsp_store.rs @@ -1245,7 +1245,6 @@ impl LocalLspStore { Ok(project_transaction) } - #[allow(clippy::too_many_arguments)] async fn execute_formatters( lsp_store: WeakEntity, formatters: &[Formatter], @@ -1495,7 +1494,6 @@ impl LocalLspStore { } } - #[allow(clippy::too_many_arguments)] async fn format_via_lsp( this: &WeakEntity, buffer: &Entity, @@ -2999,7 +2997,6 @@ impl LspStore { } } - #[allow(clippy::too_many_arguments)] pub fn new_local( buffer_store: Entity, worktree_store: Entity, @@ -3093,7 +3090,6 @@ impl LspStore { }) } - #[allow(clippy::too_many_arguments)] pub(super) fn new_remote( buffer_store: Entity, worktree_store: Entity, @@ -4619,7 +4615,6 @@ impl LspStore { Ok(()) } - #[allow(clippy::too_many_arguments)] async fn resolve_completion_remote( project_id: u64, server_id: LanguageServerId, @@ -7736,7 +7731,6 @@ impl LspStore { Ok(()) } - #[allow(clippy::too_many_arguments)] fn insert_newly_running_language_server( &mut self, adapter: Arc, diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index ec8e66fccc..52351a5eb8 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -1118,7 +1118,6 @@ impl Project { .await } - #[allow(clippy::too_many_arguments)] async fn from_join_project_response( response: TypedEnvelope, subscriptions: [EntitySubscription; 5], diff --git a/crates/remote/src/ssh_session.rs b/crates/remote/src/ssh_session.rs index 1eaba738cc..0309fb5da9 100644 --- a/crates/remote/src/ssh_session.rs +++ b/crates/remote/src/ssh_session.rs @@ -1280,7 +1280,6 @@ impl From for AnyProtoClient { #[async_trait(?Send)] trait RemoteConnection: Send + Sync { - #[allow(clippy::too_many_arguments)] fn start_proxy( &self, unique_identifier: String, diff --git a/crates/rich_text/src/rich_text.rs b/crates/rich_text/src/rich_text.rs index 0da84bbfec..575e4318c3 100644 --- a/crates/rich_text/src/rich_text.rs +++ b/crates/rich_text/src/rich_text.rs @@ -175,7 +175,6 @@ impl RichText { } } -#[allow(clippy::too_many_arguments)] pub fn render_markdown_mut( block: &str, mut mentions: &[Mention], diff --git a/crates/semantic_index/src/worktree_index.rs b/crates/semantic_index/src/worktree_index.rs index 058cec14d4..f4ec4a5c6d 100644 --- a/crates/semantic_index/src/worktree_index.rs +++ b/crates/semantic_index/src/worktree_index.rs @@ -116,7 +116,6 @@ impl WorktreeIndex { }) } - #[allow(clippy::too_many_arguments)] pub fn new( worktree: Entity, db_connection: heed::Env, diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index e256366fe4..487a260c24 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -325,7 +325,6 @@ pub struct TerminalBuilder { } impl TerminalBuilder { - #[allow(clippy::too_many_arguments)] pub fn new( working_directory: Option, python_venv_directory: Option, diff --git a/crates/terminal_view/src/terminal_element.rs b/crates/terminal_view/src/terminal_element.rs index 17276c628a..26b1e7ac03 100644 --- a/crates/terminal_view/src/terminal_element.rs +++ b/crates/terminal_view/src/terminal_element.rs @@ -171,7 +171,6 @@ impl InteractiveElement for TerminalElement { impl StatefulInteractiveElement for TerminalElement {} impl TerminalElement { - #[allow(clippy::too_many_arguments)] pub fn new( terminal: Entity, terminal_view: Entity, diff --git a/crates/title_bar/src/collab.rs b/crates/title_bar/src/collab.rs index b5e6f02d33..b5cdb7acc6 100644 --- a/crates/title_bar/src/collab.rs +++ b/crates/title_bar/src/collab.rs @@ -191,7 +191,6 @@ impl TitleBar { ) } - #[allow(clippy::too_many_arguments)] fn render_collaborator( &self, user: &Arc, diff --git a/crates/toolchain_selector/src/toolchain_selector.rs b/crates/toolchain_selector/src/toolchain_selector.rs index 5754cf1661..0a5a643890 100644 --- a/crates/toolchain_selector/src/toolchain_selector.rs +++ b/crates/toolchain_selector/src/toolchain_selector.rs @@ -85,7 +85,6 @@ impl ToolchainSelector { Some(()) } - #[allow(clippy::too_many_arguments)] fn new( workspace: WeakEntity, project: Entity, @@ -143,7 +142,6 @@ pub struct ToolchainSelectorDelegate { } impl ToolchainSelectorDelegate { - #[allow(clippy::too_many_arguments)] fn new( active_toolchain: Option, toolchain_selector: WeakEntity, diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 476ff01e8d..37299f24be 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -843,7 +843,6 @@ impl Pane { } } - #[allow(clippy::too_many_arguments)] pub(crate) fn open_item( &mut self, project_entry_id: Option, @@ -928,7 +927,6 @@ impl Pane { } } - #[allow(clippy::too_many_arguments)] pub fn add_item_inner( &mut self, item: Box, diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs index 58ae40c536..7d6f4cc483 100644 --- a/crates/workspace/src/pane_group.rs +++ b/crates/workspace/src/pane_group.rs @@ -122,7 +122,6 @@ impl PaneGroup { }; } - #[allow(clippy::too_many_arguments)] pub fn render( &self, project: &Entity, @@ -221,7 +220,6 @@ impl Member { } } - #[allow(clippy::too_many_arguments)] pub fn render( &self, project: &Entity, @@ -671,7 +669,6 @@ impl PaneAxis { None } - #[allow(clippy::too_many_arguments)] fn render( &self, project: &Entity, @@ -875,7 +872,6 @@ mod element { self } - #[allow(clippy::too_many_arguments)] fn compute_resize( flexes: &Arc>>, e: &MouseMoveEvent, @@ -965,7 +961,6 @@ mod element { window.refresh(); } - #[allow(clippy::too_many_arguments)] fn layout_handle( axis: Axis, pane_bounds: Bounds, diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 2b51bfbfad..cf8f6001e6 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -2732,7 +2732,6 @@ impl Workspace { ) } - #[allow(clippy::too_many_arguments)] pub fn add_item( &mut self, pane: Entity, @@ -2830,7 +2829,6 @@ impl Workspace { self.open_path_preview(path, pane, focus_item, false, true, window, cx) } - #[allow(clippy::too_many_arguments)] pub fn open_path_preview( &mut self, path: impl Into, diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index ab38e36c18..a56eac913d 100644 --- a/crates/zeta/src/zeta.rs +++ b/crates/zeta/src/zeta.rs @@ -353,7 +353,6 @@ impl Zeta { } } - #[allow(clippy::too_many_arguments)] fn request_completion_impl( &mut self, workspace: Option>, @@ -791,7 +790,6 @@ and then another } } - #[allow(clippy::too_many_arguments)] fn process_completion_response( prediction_response: PredictEditsResponse, buffer: Entity,