diff --git a/Cargo.toml b/Cargo.toml index 4b787d5e75a8529eb58c1387c9adb042dd834341..be7f24eeb9d0d24cc837c2d3639552be21353497 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -701,6 +701,7 @@ codegen-units = 16 [workspace.lints.clippy] dbg_macro = "deny" todo = "deny" +too_many_arguments = "allow" # Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so # warning on this rule produces a lot of noise. diff --git a/crates/assistant/src/inline_assistant.rs b/crates/assistant/src/inline_assistant.rs index b9d99cb19e51c9fea77548fc649c3c6ab7512d18..d58e13ac2351e12fe2e05d55b88a77dc3fff1801 100644 --- a/crates/assistant/src/inline_assistant.rs +++ b/crates/assistant/src/inline_assistant.rs @@ -387,7 +387,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 e9fb54028a1420de35b4370730f25fc252dc6a28..ca605ed613765e8cb007873a86bceedc50590ae9 100644 --- a/crates/assistant/src/terminal_inline_assistant.rs +++ b/crates/assistant/src/terminal_inline_assistant.rs @@ -701,7 +701,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 2baabf4b5623e9dc68a8ba6e87ced79192e7856a..948ebcc852ed10d7dc00a3d289e6250270d7c7b1 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 2158f3279f6a959e13e667e0aa033273d5a5dd76..1f2189df82d1f23e97c187b1cdaf7fc31d7a8e18 100644 --- a/crates/assistant2/src/inline_assistant.rs +++ b/crates/assistant2/src/inline_assistant.rs @@ -476,7 +476,6 @@ impl InlineAssistant { } } - #[allow(clippy::too_many_arguments)] pub fn suggest_assist( &mut self, editor: &Entity, @@ -1433,7 +1432,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 { @@ -1545,7 +1543,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 c1764cf30d285b84e175a17f29681a36e4a0f066..a1742c4b95322aab3cb688fcacc3b0015c7597bc 100644 --- a/crates/assistant2/src/inline_prompt_editor.rs +++ b/crates/assistant2/src/inline_prompt_editor.rs @@ -823,7 +823,6 @@ impl InlineAssistId { } impl PromptEditor { - #[allow(clippy::too_many_arguments)] pub fn new_buffer( id: InlineAssistId, gutter_dimensions: Arc>, @@ -984,7 +983,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 6a4e1de8744675823157e570e30bbc2e00a51072..10d6f220088cfa6d668afb7d17f5fefe05887022 100644 --- a/crates/assistant_context_editor/src/context.rs +++ b/crates/assistant_context_editor/src/context.rs @@ -650,7 +650,6 @@ impl AssistantContext { ) } - #[allow(clippy::too_many_arguments)] pub fn new( id: ContextId, replica_id: ReplicaId, @@ -771,7 +770,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 24cfe23596878f02e26e454b49233a634d4bafe4..685a185a6cd96cacd0bf5dd77a48a18c49be5fb3 100644 --- a/crates/assistant_context_editor/src/context_editor.rs +++ b/crates/assistant_context_editor/src/context_editor.rs @@ -517,7 +517,6 @@ impl ContextEditor { } } - #[allow(clippy::too_many_arguments)] pub fn run_command( &mut self, command_range: Range, @@ -2058,7 +2057,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 a58b57dc48142c01d949366824d57fd8de59d739..f52bf8d89acb18a9fe53531c699bb646d3315605 100644 --- a/crates/assistant_context_editor/src/slash_command.rs +++ b/crates/assistant_context_editor/src/slash_command.rs @@ -136,7 +136,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 f3811dfa8c140f39f4375ca93496aad59827f5af..9d77905642afdc832006443f6612658654ca9744 100644 --- a/crates/assistant_slash_command/src/assistant_slash_command.rs +++ b/crates/assistant_slash_command/src/assistant_slash_command.rs @@ -88,7 +88,7 @@ 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 9d22576c3560270a0f39b8de4bcac2c22bf42a9c..dc8ce87a924d5e5f4ae6ab25eb4f38de29ee0b87 100644 --- a/crates/buffer_diff/src/buffer_diff.rs +++ b/crates/buffer_diff/src/buffer_diff.rs @@ -721,7 +721,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 bc82120a4283f8559c411d0fc81275b5e0b7f75b..e4f6e0f497f7b2380dd762c181858fcd8309f5eb 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 02958556b7897735ba44b89f4fd8b0f9af1f996a..6e333092e9089ddc38c564c9492d050182a01d5e 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 27e8039f54aef1d337266c545d9fab058cd6cb95..c6094752f98bf3ab61da34e5b8087eb069513f8e 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 5629beb322b4533f71659562589da15d9cff8449..46704e8efe4d9595639b52933aedfbaa2cdd8926 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 189a5e5471f9f8ffb58fefd742dd139371e8a964..42f552c2dc5d25a12da3162b079a9135b2946c9d 100644 --- a/crates/collab/src/rpc.rs +++ b/crates/collab/src/rpc.rs @@ -691,7 +691,6 @@ impl Server { }) } - #[allow(clippy::too_many_arguments)] pub fn handle_connection( self: &Arc, connection: Connection, @@ -1075,7 +1074,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 aee83f041106bfe01a1cb3f4791e48b255a44c07..773d31fc3b65fbaa5ad74b942b5833018019848f 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 e9afd324875414b37eaf1595dac5b0d37172e4e0..062b9dd81d5caf1053b13748b9f664d22dbecb9e 100644 --- a/crates/collab_ui/src/collab_panel.rs +++ b/crates/collab_ui/src/collab_panel.rs @@ -870,7 +870,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 5f86b468439f3a3e801676dfa29e44d632d68fa4..10ebd5bf1ea63b258327b2ccfe285a06be9c7c8d 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 5e788821c9613f5b01c12132b8b446ff5e8d4d23..97be8e3bee05d5f708c402ff7c0e802f7c860155 100644 --- a/crates/editor/src/display_map/block_map.rs +++ b/crates/editor/src/display_map/block_map.rs @@ -723,7 +723,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 50f54849625fb5a4b880f4fa708f3d85f9d6cb65..2c41a3f5fe0cc078382eb5b6a2d52d34217f4df4 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -5883,7 +5883,6 @@ impl Editor { editor_bg_color.blend(accent_color.opacity(0.1)) } - #[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 2e022ec2f338d02a2df0b750c3133e92b90b3eb8..cd9d28b1a7b67e4ef40894271da546959ae495e2 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -930,7 +930,6 @@ impl EditorElement { cx.notify() } - #[allow(clippy::too_many_arguments)] fn layout_selections( &self, start_anchor: Anchor, @@ -1102,7 +1101,6 @@ impl EditorElement { cursors } - #[allow(clippy::too_many_arguments)] fn layout_visible_cursors( &self, snapshot: &EditorSnapshot, @@ -1452,7 +1450,6 @@ impl EditorElement { axis_pair(horizontal_scrollbar, vertical_scrollbar) } - #[allow(clippy::too_many_arguments)] fn prepaint_crease_toggles( &self, crease_toggles: &mut [Option], @@ -1487,7 +1484,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn prepaint_crease_trailers( &self, trailers: Vec>, @@ -1609,7 +1605,6 @@ impl EditorElement { display_hunks } - #[allow(clippy::too_many_arguments)] fn layout_inline_blame( &self, display_row: DisplayRow, @@ -1696,7 +1691,6 @@ impl EditorElement { Some(element) } - #[allow(clippy::too_many_arguments)] fn layout_blame_entries( &self, buffer_rows: &[RowInfo], @@ -1765,7 +1759,6 @@ impl EditorElement { Some(shaped_lines) } - #[allow(clippy::too_many_arguments)] fn layout_indent_guides( &self, content_origin: gpui::Point, @@ -1883,7 +1876,6 @@ impl EditorElement { (offset_y, length) } - #[allow(clippy::too_many_arguments)] fn layout_run_indicators( &self, line_height: Pixels, @@ -1976,7 +1968,6 @@ impl EditorElement { }) } - #[allow(clippy::too_many_arguments)] fn layout_code_actions_indicator( &self, line_height: Pixels, @@ -2075,7 +2066,6 @@ impl EditorElement { relative_rows } - #[allow(clippy::too_many_arguments)] fn layout_line_numbers( &self, gutter_hitbox: Option<&Hitbox>, @@ -2288,7 +2278,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn prepaint_lines( &self, start_row: DisplayRow, @@ -2315,7 +2304,6 @@ impl EditorElement { line_elements } - #[allow(clippy::too_many_arguments)] fn render_block( &self, block: &Block, @@ -2777,7 +2765,6 @@ impl EditorElement { })) } - #[allow(clippy::too_many_arguments)] fn render_blocks( &self, rows: Range, @@ -2962,7 +2949,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, @@ -3006,7 +2992,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn layout_sticky_buffer_header( &self, StickyHeaderExcerpt { @@ -3081,7 +3066,6 @@ impl EditorElement { header } - #[allow(clippy::too_many_arguments)] fn layout_cursor_popovers( &self, line_height: Pixels, @@ -3270,7 +3254,6 @@ impl EditorElement { ); } - #[allow(clippy::too_many_arguments)] fn layout_gutter_menu( &self, line_height: Pixels, @@ -3323,7 +3306,6 @@ impl EditorElement { ); } - #[allow(clippy::too_many_arguments)] fn layout_popovers_above_or_below_line( &self, target_position: gpui::Point, @@ -3428,7 +3410,6 @@ impl EditorElement { Some((laid_out_popovers, y_flipped)) } - #[allow(clippy::too_many_arguments)] fn layout_context_menu_aside( &self, y_flipped: bool, @@ -3548,7 +3529,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn layout_edit_prediction_popover( &self, text_bounds: &Bounds, @@ -4005,7 +3985,6 @@ impl EditorElement { Some(element) } - #[allow(clippy::too_many_arguments)] fn layout_hover_popovers( &self, snapshot: &EditorSnapshot, @@ -4122,7 +4101,6 @@ impl EditorElement { } } - #[allow(clippy::too_many_arguments)] fn layout_diff_hunk_controls( &self, row_range: Range, @@ -4203,7 +4181,6 @@ impl EditorElement { controls } - #[allow(clippy::too_many_arguments)] fn layout_signature_help( &self, hitbox: &Hitbox, @@ -5471,7 +5448,6 @@ impl EditorElement { }); } - #[allow(clippy::too_many_arguments)] fn paint_highlighted_range( &self, range: Range, @@ -5886,7 +5862,6 @@ impl AcceptEditPredictionBinding { } } -#[allow(clippy::too_many_arguments)] fn prepaint_gutter_button( button: IconButton, row: DisplayRow, @@ -6126,7 +6101,6 @@ impl fmt::Debug for LineFragment { } impl LineWithInvisibles { - #[allow(clippy::too_many_arguments)] fn from_chunks<'a>( chunks: impl Iterator>, editor_style: &EditorStyle, @@ -6331,7 +6305,6 @@ impl LineWithInvisibles { layouts } - #[allow(clippy::too_many_arguments)] fn prepaint( &mut self, line_height: Pixels, @@ -6366,7 +6339,6 @@ impl LineWithInvisibles { } } - #[allow(clippy::too_many_arguments)] fn draw( &self, layout: &EditorLayout, @@ -6410,7 +6382,6 @@ impl LineWithInvisibles { ); } - #[allow(clippy::too_many_arguments)] fn draw_invisibles( &self, selection_ranges: &[Range], @@ -7718,7 +7689,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 637e7de466da9ee704cc9df20421462ee6f241d3..5a556018ab76144447f06aabf552a0a8bbaa0520 100644 --- a/crates/editor/src/scroll.rs +++ b/crates/editor/src/scroll.rs @@ -224,7 +224,6 @@ impl ScrollManager { self.anchor.scroll_position(snapshot) } - #[allow(clippy::too_many_arguments)] fn set_scroll_position( &mut self, scroll_position: gpui::Point, @@ -299,7 +298,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 911637aa349ad507855998a1f79f28fa6acbea30..5953bd4c1127375ea7d1854e114d801c0da66568 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 4bb12295380c05a8ffa0fe3c91c96d7aa7a43b0e..3abf038271a21e8cf17453743cd3856b83ba6faa 100644 --- a/crates/extension_api/src/extension_api.rs +++ b/crates/extension_api/src/extension_api.rs @@ -191,7 +191,7 @@ 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)] + #![allow(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 e1e866705ac7447367df376c60ac1b03cd078dc1..a6f62991361e198872e75b7605db1dc548d1d678 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 20d3503e0b49042fc8a1cd95d417cd1f3c9af238..627093244d70ab5e7ea872194463fc90018abdeb 100644 --- a/crates/file_finder/src/file_finder.rs +++ b/crates/file_finder/src/file_finder.rs @@ -25,6 +25,7 @@ use project::{PathMatchCandidateSet, Project, ProjectPath, WorktreeId}; use settings::Settings; use std::{ cmp, + ops::Range, path::{Path, PathBuf}, sync::{ atomic::{self, AtomicBool}, @@ -381,6 +382,7 @@ impl PartialOrd for ProjectPanelOrdMatch { struct Matches { separate_history: bool, matches: Vec, + elided_byte_range: Option>, } #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)] @@ -392,6 +394,35 @@ enum Match { Search(ProjectPanelOrdMatch), } +struct MatchLabels { + path: String, + path_positions: Vec, + file_name: String, + file_name_positions: Vec, +} + +#[derive(Clone, Copy, Debug)] +struct EmWidths { + normal: Pixels, + small: Pixels, +} + +fn em_widths(window: &mut Window, cx: &mut App) -> EmWidths { + let style = window.text_style(); + let font_id = window.text_system().resolve_font(&style.font()); + let font_size = TextSize::Default.rems(cx).to_pixels(window.rem_size()); + let normal = cx + .text_system() + .em_width(font_id, font_size) + .unwrap_or(px(16.)); + let font_size = TextSize::Small.rems(cx).to_pixels(window.rem_size()); + let small = cx + .text_system() + .em_width(font_id, font_size) + .unwrap_or(px(10.)); + EmWidths { normal, small } +} + impl Match { fn path(&self) -> &Arc { match self { @@ -406,6 +437,43 @@ impl Match { Match::Search(panel_match) => Some(&panel_match), } } + + fn common_prefix<'a>(&self, other: &'a Path) -> &'a Path { + let mut prefix = other; + let path_positions = match self { + Match::History { + panel_match: Some(mat), + .. + } + | Match::Search(mat) => mat.0.positions.as_slice(), + Match::History { + panel_match: None, .. + } => &[], + }; + let first_path_position = *path_positions.iter().min().unwrap_or(&0); + while self.path().strip_prefix(prefix).is_err() + || prefix.to_string_lossy().len() > first_path_position + { + let Some(parent) = prefix.parent() else { + break; + }; + prefix = parent; + } + prefix + } + + fn approx_width(&self, em_widths: EmWidths) -> Pixels { + let file_name = self.path().file_name().map_or_else( + || self.path().to_string_lossy(), + |file_name| file_name.to_string_lossy(), + ); + let parent = self + .path() + .parent() + .map_or_else(|| "".into(), |parent| parent.to_string_lossy()); + px(file_name.chars().count() as f32) * em_widths.normal + + px(parent.chars().count() as f32) * em_widths.small + } } impl Matches { @@ -451,7 +519,11 @@ impl Matches { query: Option<&FileSearchQuery>, new_search_matches: impl Iterator, extend_old_matches: bool, + em_widths: EmWidths, + max_width: Pixels, ) { + self.elided_byte_range = None; + let Some(query) = query else { // assuming that if there's no query, then there's no search matches. self.matches.clear(); @@ -507,6 +579,31 @@ impl Matches { } } } + + let Some((first, rest)) = self.matches.split_first() else { + return; + }; + let mut prefix = first.path().as_ref(); + let mut widest_match = first.approx_width(em_widths); + for mat in rest { + widest_match = widest_match.max(mat.approx_width(em_widths)); + prefix = mat.common_prefix(prefix); + } + + if widest_match > max_width { + let components = prefix.components().collect::>(); + let prefix = prefix.to_string_lossy(); + if components.len() > 3 { + let after_first = components[1..].iter().collect::(); + let after_first = after_first.to_string_lossy(); + let start = prefix.len() - after_first.len(); + let after_first_before_last = components[1..components.len() - 2] + .iter() + .collect::(); + let after_first_before_last = after_first_before_last.to_string_lossy(); + self.elided_byte_range = Some(start..start + after_first_before_last.len()); + } + } } /// If a < b, then a is a worse match, aligning with the `ProjectPanelOrdMatch` ordering. @@ -535,6 +632,25 @@ impl Matches { } } +impl MatchLabels { + fn check(&self) { + let file_name = &self.file_name; + for i in &self.file_name_positions { + assert!( + self.file_name.is_char_boundary(*i), + "{i} is not a valid char boundary in file name {file_name:?}" + ); + } + let path = &self.path; + for i in &self.path_positions { + assert!( + self.path.is_char_boundary(*i), + "{i} is not a valid char boundary in path {path:?}" + ); + } + } +} + fn matching_history_items<'a>( history_items: impl IntoIterator, currently_opened: Option<&'a FoundPath>, @@ -644,7 +760,6 @@ impl FileSearchQuery { } impl FileFinderDelegate { - #[allow(clippy::too_many_arguments)] fn new( file_finder: WeakEntity, workspace: WeakEntity, @@ -745,10 +860,10 @@ impl FileFinderDelegate { .map(ProjectPanelOrdMatch); let did_cancel = cancel_flag.load(atomic::Ordering::Relaxed); picker - .update(&mut cx, |picker, cx| { + .update_in(&mut cx, |picker, window, cx| { picker .delegate - .set_search_matches(search_id, did_cancel, query, matches, cx) + .set_search_matches(search_id, did_cancel, query, matches, window, cx) }) .log_err(); }) @@ -760,9 +875,13 @@ impl FileFinderDelegate { did_cancel: bool, query: FileSearchQuery, matches: impl IntoIterator, - + window: &mut Window, cx: &mut Context>, ) { + let em_widths = em_widths(window, cx); + let file_finder_settings = FileFinderSettings::get_global(cx); + let max_width = FileFinder::modal_max_width(file_finder_settings.modal_max_width, window); + if search_id >= self.latest_search_id { self.latest_search_id = search_id; let query_changed = Some(query.path_query()) @@ -784,6 +903,8 @@ impl FileFinderDelegate { Some(&query), matches.into_iter(), extend_old_matches, + em_widths, + max_width, ); self.selected_index = selected_match.map_or_else( @@ -802,13 +923,8 @@ impl FileFinderDelegate { } } - fn labels_for_match( - &self, - path_match: &Match, - cx: &App, - ix: usize, - ) -> (String, Vec, String, Vec) { - let (file_name, file_name_positions, full_path, full_path_positions) = match &path_match { + fn labels_for_match(&self, path_match: &Match, cx: &App, ix: usize) -> MatchLabels { + let mut labels = match &path_match { Match::History { path: entry_path, panel_match, @@ -823,18 +939,18 @@ impl FileFinderDelegate { if !has_worktree { if let Some(absolute_path) = &entry_path.absolute { - return ( - absolute_path + return MatchLabels { + file_name: absolute_path .file_name() .map_or_else( || project_relative_path.to_string_lossy(), |file_name| file_name.to_string_lossy(), ) .to_string(), - Vec::new(), - absolute_path.to_string_lossy().to_string(), - Vec::new(), - ); + file_name_positions: Vec::new(), + path: absolute_path.to_string_lossy().to_string(), + path_positions: Vec::new(), + }; } } @@ -865,44 +981,39 @@ impl FileFinderDelegate { Match::Search(path_match) => self.labels_for_path_match(&path_match.0), }; - if file_name_positions.is_empty() { + if labels.file_name_positions.is_empty() { if let Some(user_home_path) = std::env::var("HOME").ok() { let user_home_path = user_home_path.trim(); if !user_home_path.is_empty() { - if (&full_path).starts_with(user_home_path) { - return ( - file_name, - file_name_positions, - full_path.replace(user_home_path, "~"), - full_path_positions, - ); + if labels.path.starts_with(user_home_path) { + labels.path.replace_range(0..user_home_path.len(), "~"); + labels.path_positions.retain_mut(|position| { + if *position >= user_home_path.len() { + *position -= user_home_path.len(); + *position += 1; + true + } else { + false + } + }) } } } } - ( - file_name, - file_name_positions, - full_path, - full_path_positions, - ) + labels.check(); + labels } - fn labels_for_path_match( - &self, - path_match: &PathMatch, - ) -> (String, Vec, String, Vec) { - let path = &path_match.path; - let path_string = path.to_string_lossy(); - let full_path = [path_match.path_prefix.as_ref(), path_string.as_ref()].join(""); + fn labels_for_path_match(&self, path_match: &PathMatch) -> MatchLabels { let mut path_positions = path_match.positions.clone(); - let file_name = path.file_name().map_or_else( + let file_name = path_match.path.file_name().map_or_else( || path_match.path_prefix.to_string(), |file_name| file_name.to_string_lossy().to_string(), ); - let file_name_start = path_match.path_prefix.len() + path_string.len() - file_name.len(); + let mut path = path_match.path.to_string_lossy().to_string(); + let file_name_start = path_match.path_prefix.len() + path.len() - file_name.len(); let file_name_positions = path_positions .iter() .filter_map(|pos| { @@ -914,10 +1025,31 @@ impl FileFinderDelegate { }) .collect(); - let full_path = full_path.trim_end_matches(&file_name).to_string(); - path_positions.retain(|idx| *idx < full_path.len()); + path.drain(file_name_start.saturating_sub(path_match.path_prefix.len())..); + path_positions.retain_mut(|idx| { + if *idx < path.len() { + if let Some(elided_range) = &self.matches.elided_byte_range { + if *idx >= elided_range.end { + *idx += '…'.len_utf8(); + *idx -= elided_range.len(); + } + } + true + } else { + false + } + }); - (file_name, file_name_positions, full_path, path_positions) + if let Some(elided_range) = &self.matches.elided_byte_range { + path.replace_range(elided_range.clone(), "…"); + } + + MatchLabels { + file_name, + file_name_positions, + path, + path_positions, + } } fn lookup_absolute_path( @@ -969,10 +1101,17 @@ impl FileFinderDelegate { } picker - .update_in(&mut cx, |picker, _, cx| { + .update_in(&mut cx, |picker, window, cx| { let picker_delegate = &mut picker.delegate; let search_id = util::post_inc(&mut picker_delegate.search_count); - picker_delegate.set_search_matches(search_id, false, query, path_matches, cx); + picker_delegate.set_search_matches( + search_id, + false, + query, + path_matches, + window, + cx, + ); anyhow::Ok(()) }) @@ -1049,6 +1188,10 @@ impl PickerDelegate for FileFinderDelegate { window: &mut Window, cx: &mut Context>, ) -> Task<()> { + let em_widths = em_widths(window, cx); + let file_finder_settings = FileFinderSettings::get_global(cx); + let max_width = FileFinder::modal_max_width(file_finder_settings.modal_max_width, window); + let raw_query = raw_query.replace(' ', ""); let raw_query = raw_query.trim(); if raw_query.is_empty() { @@ -1076,6 +1219,8 @@ impl PickerDelegate for FileFinderDelegate { None, None.into_iter(), false, + em_widths, + max_width, ); self.first_update = false; @@ -1269,11 +1414,10 @@ impl PickerDelegate for FileFinderDelegate { .size(IconSize::Small.rems()) .into_any_element(), }; - let (file_name, file_name_positions, full_path, full_path_positions) = - self.labels_for_match(path_match, cx, ix); + let labels = self.labels_for_match(path_match, cx, ix); let file_icon = if settings.file_icons { - FileIcons::get_icon(Path::new(&file_name), cx) + FileIcons::get_icon(Path::new(&labels.file_name), cx) .map(Icon::from_path) .map(|icon| icon.color(Color::Muted)) } else { @@ -1291,9 +1435,12 @@ impl PickerDelegate for FileFinderDelegate { h_flex() .gap_2() .py_px() - .child(HighlightedLabel::new(file_name, file_name_positions)) + .child(HighlightedLabel::new( + labels.file_name, + labels.file_name_positions, + )) .child( - HighlightedLabel::new(full_path, full_path_positions) + HighlightedLabel::new(labels.path, labels.path_positions) .size(LabelSize::Small) .color(Color::Muted), ), diff --git a/crates/file_finder/src/file_finder_tests.rs b/crates/file_finder/src/file_finder_tests.rs index f14106d62af03570e245536d10ac814b074582ae..fbe3f712cc0a2a9ae8674ad68d8937df6069d529 100644 --- a/crates/file_finder/src/file_finder_tests.rs +++ b/crates/file_finder/src/file_finder_tests.rs @@ -384,6 +384,7 @@ async fn test_matching_cancellation(cx: &mut TestAppContext) { ProjectPanelOrdMatch(matches[1].clone()), ProjectPanelOrdMatch(matches[3].clone()), ], + window, cx, ); @@ -398,6 +399,7 @@ async fn test_matching_cancellation(cx: &mut TestAppContext) { ProjectPanelOrdMatch(matches[2].clone()), ProjectPanelOrdMatch(matches[3].clone()), ], + window, cx, ); @@ -492,12 +494,11 @@ async fn test_single_file_worktrees(cx: &mut TestAppContext) { let matches = collect_search_matches(picker).search_matches_only(); assert_eq!(matches.len(), 1); - let (file_name, file_name_positions, full_path, full_path_positions) = - delegate.labels_for_path_match(&matches[0]); - assert_eq!(file_name, "the-file"); - assert_eq!(file_name_positions, &[0, 1, 4]); - assert_eq!(full_path, ""); - assert_eq!(full_path_positions, &[0; 0]); + let labels = delegate.labels_for_path_match(&matches[0]); + assert_eq!(labels.file_name, "the-file"); + assert_eq!(labels.file_name_positions, &[0, 1, 4]); + assert_eq!(labels.path, ""); + assert_eq!(labels.path_positions, &[0; 0]); }); // Since the worktree root is a file, searching for its name followed by a slash does diff --git a/crates/fuzzy/src/matcher.rs b/crates/fuzzy/src/matcher.rs index 66a480d87a815181f68d76318e18e711faed4f60..e1d016956f4da1190e64a16da84d369f83d61c1c 100644 --- a/crates/fuzzy/src/matcher.rs +++ b/crates/fuzzy/src/matcher.rs @@ -164,7 +164,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 4cdc8929a5f0123840120b25ec4151bc50755139..a51e7933b8581e1aa22adb62a9ba7865aa673d91 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 935de8b1d8b6afdd6f24275fdae4219420ad5875..0917d8bea47b933114e3d31ca03a8ad0ef11f257 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 27da7d66c59a87f896fc18591f0d8d26deb84e6f..679cc1f1babe0eb89d4d51f6464c796742b1aa32 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 e1dfe0eab1da5169c4acf535e77d3214ca908d2b..365c5350f15dc499f19e33044c6c45844bf1a752 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 47786da0e6ed600f500a468e4b3ea18d70ea837e..d0d8bc799236c25912902a5cd9bdf2712b4f4065 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -393,7 +393,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 422db29cbd0c81e3eb3dade87910d0264b332ab7..f6efd8f37c68b0893f108c9d812ffe4264f67c13 100644 --- a/crates/multi_buffer/src/multi_buffer.rs +++ b/crates/multi_buffer/src/multi_buffer.rs @@ -2906,7 +2906,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 14d0b77d910a179bf2f81aa2156d009d3d968ae1..d6f97fe906ddac01e016c331aa4593d215f85366 100644 --- a/crates/outline_panel/src/outline_panel.rs +++ b/crates/outline_panel/src/outline_panel.rs @@ -2361,7 +2361,6 @@ impl OutlinePanel { ) } - #[allow(clippy::too_many_arguments)] fn render_search_match( &mut self, multi_buffer_snapshot: Option<&MultiBufferSnapshot>, @@ -2453,7 +2452,6 @@ impl OutlinePanel { )) } - #[allow(clippy::too_many_arguments)] fn entry_element( &self, rendered_entry: PanelEntry, @@ -3839,7 +3837,6 @@ impl OutlinePanel { }) } - #[allow(clippy::too_many_arguments)] fn push_entry( &self, state: &mut GenerationState, @@ -4057,7 +4054,6 @@ impl OutlinePanel { update_cached_entries } - #[allow(clippy::too_many_arguments)] fn add_excerpt_entries( &self, state: &mut GenerationState, @@ -4116,7 +4112,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 28e88c504a3086b55985c0158484f08a489342a1..b778145c0c71c07b82b84778494ae5fe58e76758 100644 --- a/crates/project/src/lsp_store.rs +++ b/crates/project/src/lsp_store.rs @@ -1201,7 +1201,6 @@ impl LocalLspStore { Ok(project_transaction) } - #[allow(clippy::too_many_arguments)] async fn execute_formatters( lsp_store: WeakEntity, formatters: &[Formatter], @@ -1451,7 +1450,6 @@ impl LocalLspStore { } } - #[allow(clippy::too_many_arguments)] async fn format_via_lsp( this: &WeakEntity, buffer: &Entity, @@ -2960,7 +2958,6 @@ impl LspStore { } } - #[allow(clippy::too_many_arguments)] pub fn new_local( buffer_store: Entity, worktree_store: Entity, @@ -3054,7 +3051,6 @@ impl LspStore { }) } - #[allow(clippy::too_many_arguments)] pub(super) fn new_remote( buffer_store: Entity, worktree_store: Entity, @@ -4485,7 +4481,6 @@ impl LspStore { Ok(()) } - #[allow(clippy::too_many_arguments)] async fn resolve_completion_remote( project_id: u64, server_id: LanguageServerId, @@ -7546,7 +7541,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 b01bb1a9dcbef75e7ee81c4aafe8855de9d9e7a1..46a0fdfed51c071f711ff7657936b71da8cad5ea 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -971,7 +971,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 2d83b492a991227df8a3c5c7a2939744441c7770..ca15f13fa55caa6e2b27d498bdea04973271b5a8 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 3f0e0cf4482c5d8ccf07a9ee38c3a60609cd3c31..bdc2b9b34ec315c1b71c5b6b6042df516f54c4cf 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 c588c7fb983e0005284ea174bc62bf8451ac106d..44eeed9dfb10c4bc3f6011523bcdbc5660f21355 100644 --- a/crates/semantic_index/src/worktree_index.rs +++ b/crates/semantic_index/src/worktree_index.rs @@ -117,7 +117,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 df9fcb229d8656fb559904c77603da8c05d41c92..4e58618d51c9f6c5c98d767bbe27021660954b83 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -321,7 +321,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 e11a4cf65c37bd0c1a328c8971d9c8e321ca5b5d..9a7a0e79d39e9dcd98bd3dd6fce42a7b16b0946e 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 536190cc5f1cf53bf358115c933b727077837400..311c7632faefbea090fba69deed7f807b2dc5d71 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 5754cf1661f7f3dbde6f271a7c46862ed56f887e..0a5a6438906805811f3d6e8fdd697b9297c54be8 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 50563169ddc40fa793316fb06661e2e9b4ab40ba..5a3e0dde9d599c42521be0e780ffdc677f422e34 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, diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs index 0b2cc55e3bc33794d0a115baab3b6689936f4b4f..84466b0022fd450484421d2970b289f27c0bb97c 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, @@ -228,7 +227,6 @@ impl Member { } } - #[allow(clippy::too_many_arguments)] pub fn render( &self, project: &Entity, @@ -678,7 +676,6 @@ impl PaneAxis { None } - #[allow(clippy::too_many_arguments)] fn render( &self, project: &Entity, @@ -882,7 +879,6 @@ mod element { self } - #[allow(clippy::too_many_arguments)] fn compute_resize( flexes: &Arc>>, e: &MouseMoveEvent, @@ -972,7 +968,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 4a6ef2cd0030490a4525aeb526e8de41771ebd85..aa100bab6b26c7436bb32b6b8cde27719881e2a7 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -2696,7 +2696,6 @@ impl Workspace { ) } - #[allow(clippy::too_many_arguments)] pub fn add_item( &mut self, pane: Entity, diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index 7627b1e832e6f9beffd3675318dbd06462e5cad6..30cab4b91b2ca93f4b7f98a28446d3536c053b70 100644 --- a/crates/zeta/src/zeta.rs +++ b/crates/zeta/src/zeta.rs @@ -355,7 +355,6 @@ impl Zeta { } } - #[allow(clippy::too_many_arguments)] fn request_completion_impl( &mut self, workspace: Option>, @@ -794,7 +793,6 @@ and then another } } - #[allow(clippy::too_many_arguments)] fn process_completion_response( prediction_response: PredictEditsResponse, buffer: Entity,