Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
chore: Another round of style lints fixes (#17519)
Piotr Osiewicz095a08d9c80c
diff --git a/Cargo.toml b/Cargo.tomlindex dcb94888152..ea8284ccb12 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -571,14 +571,18 @@ single_range_in_vec_init = "allow"# There are a bunch of rules currently failing in the `style` group, so# allow all of those, for now.style = { level = "allow", priority = -1 }++# Temporary list of style lints that we've fixed so far.+module_inception = { level = "deny" }+question_mark = { level = "deny" }+redundant_closure = { level = "deny" }+# Individual rules that have violations in the codebase:+type_complexity = "allow"# We often return trait objects from `new` functions.new_ret_no_self = { level = "allow" }# We have a few `next` functions that differ in lifetimes# compared to Iterator::next. Yet, clippy complains about those.should_implement_trait = { level = "allow" }-module_inception = { level = "deny" }-# Individual rules that have violations in the codebase:-type_complexity = "allow"[workspace.metadata.cargo-machete]ignored = ["bindgen", "cbindgen", "prost_build", "serde"]diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rsindex 707daf03b17..fd5f62e1881 100644--- a/crates/assistant/src/assistant_panel.rs+++ b/crates/assistant/src/assistant_panel.rs@@ -329,7 +329,7 @@ impl AssistantPanel {cx: &mut ViewContext<Self>,) -> Self {let model_selector_menu_handle = PopoverMenuHandle::default();- let model_summary_editor = cx.new_view(|cx| Editor::single_line(cx));+ let model_summary_editor = cx.new_view(Editor::single_line);let context_editor_toolbar = cx.new_view(|_| {ContextEditorToolbarItem::new(workspace,@@ -1097,7 +1097,7 @@ impl AssistantPanel {pane.activate_item(configuration_item_ix, true, true, cx);});} else {- let configuration = cx.new_view(|cx| ConfigurationView::new(cx));+ let configuration = cx.new_view(ConfigurationView::new);self.configuration_subscription = Some(cx.subscribe(&configuration,|this, _, event: &ConfigurationViewEvent, cx| match event {@@ -4222,8 +4222,7 @@ impl Item for ContextEditor {}fn deactivated(&mut self, cx: &mut ViewContext<Self>) {- self.editor- .update(cx, |editor, cx| Item::deactivated(editor, cx))+ self.editor.update(cx, Item::deactivated)}}diff --git a/crates/assistant/src/context.rs b/crates/assistant/src/context.rsindex 98146485bfb..1bf846369b7 100644--- a/crates/assistant/src/context.rs+++ b/crates/assistant/src/context.rs@@ -700,7 +700,7 @@ impl Context {telemetry: Option<Arc<Telemetry>>,cx: &mut ModelContext<Self>,) -> Self {- let id = saved_context.id.clone().unwrap_or_else(|| ContextId::new());+ let id = saved_context.id.clone().unwrap_or_else(ContextId::new);let mut this = Self::new(id,ReplicaId::default(),diff --git a/crates/assistant/src/context_store.rs b/crates/assistant/src/context_store.rsindex b584c008bc7..b6e1650c41d 100644--- a/crates/assistant/src/context_store.rs+++ b/crates/assistant/src/context_store.rs@@ -390,7 +390,7 @@ impl ContextStore {context_proto.operations.into_iter()- .map(|op| ContextOperation::from_proto(op))+ .map(ContextOperation::from_proto).collect::<Result<Vec<_>>>()}).await?;@@ -527,7 +527,7 @@ impl ContextStore {context_proto.operations.into_iter()- .map(|op| ContextOperation::from_proto(op))+ .map(ContextOperation::from_proto).collect::<Result<Vec<_>>>()}).await?;diff --git a/crates/assistant/src/inline_assistant.rs b/crates/assistant/src/inline_assistant.rsindex ed875c433dd..bfd85d2525a 100644--- a/crates/assistant/src/inline_assistant.rs+++ b/crates/assistant/src/inline_assistant.rs@@ -3073,7 +3073,7 @@ mod tests {codegen.handle_stream(String::new(),range,- future::ready(Ok(chunks_rx.map(|chunk| Ok(chunk)).boxed())),+ future::ready(Ok(chunks_rx.map(Ok).boxed())),cx,)});@@ -3145,7 +3145,7 @@ mod tests {codegen.handle_stream(String::new(),range.clone(),- future::ready(Ok(chunks_rx.map(|chunk| Ok(chunk)).boxed())),+ future::ready(Ok(chunks_rx.map(Ok).boxed())),cx,)});@@ -3220,7 +3220,7 @@ mod tests {codegen.handle_stream(String::new(),range.clone(),- future::ready(Ok(chunks_rx.map(|chunk| Ok(chunk)).boxed())),+ future::ready(Ok(chunks_rx.map(Ok).boxed())),cx,)});@@ -3294,7 +3294,7 @@ mod tests {codegen.handle_stream(String::new(),range.clone(),- future::ready(Ok(chunks_rx.map(|chunk| Ok(chunk)).boxed())),+ future::ready(Ok(chunks_rx.map(Ok).boxed())),cx,)});diff --git a/crates/assistant/src/slash_command/tab_command.rs b/crates/assistant/src/slash_command/tab_command.rsindex ca0f7681ad9..1a6884b8538 100644--- a/crates/assistant/src/slash_command/tab_command.rs+++ b/crates/assistant/src/slash_command/tab_command.rs@@ -253,7 +253,7 @@ fn tab_items_for_queries(.fold(HashMap::default(), |mut candidates, (id, path_string)| {candidates.entry(path_string)- .or_insert_with(|| Vec::new())+ .or_insert_with(Vec::new).push(id);candidates});diff --git a/crates/call/src/call.rs b/crates/call/src/call.rsindex 353c2342828..c7993f36588 100644--- a/crates/call/src/call.rs+++ b/crates/call/src/call.rs@@ -529,14 +529,13 @@ mod test {let (a, b) = cx.update(|cx| {(one_at_a_time.spawn(cx, |_| async {- assert!(false);- Ok(2)+ panic!("");}),one_at_a_time.spawn(cx, |_| async { Ok(3) }),)});- assert_eq!(a.await.unwrap(), None);+ assert_eq!(a.await.unwrap(), None::<u32>);assert_eq!(b.await.unwrap(), Some(3));let promise = cx.update(|cx| one_at_a_time.spawn(cx, |_| async { Ok(4) }));diff --git a/crates/collab/src/api/contributors.rs b/crates/collab/src/api/contributors.rsindex 277a22994cd..c3e60c25ca8 100644--- a/crates/collab/src/api/contributors.rs+++ b/crates/collab/src/api/contributors.rs@@ -30,7 +30,7 @@ struct CheckIsContributorParams {}impl CheckIsContributorParams {- fn as_contributor_selector(self) -> Result<ContributorSelector> {+ fn into_contributor_selector(self) -> Result<ContributorSelector> {if let Some(github_user_id) = self.github_user_id {return Ok(ContributorSelector::GitHubUserId { github_user_id });}@@ -54,7 +54,7 @@ async fn check_is_contributor(Extension(app): Extension<Arc<AppState>>,Query(params): Query<CheckIsContributorParams>,) -> Result<Json<CheckIsContributorResponse>> {- let params = params.as_contributor_selector()?;+ let params = params.into_contributor_selector()?;if RenovateBot::is_renovate_bot(¶ms) {return Ok(Json(CheckIsContributorResponse {diff --git a/crates/collab/src/api/events.rs b/crates/collab/src/api/events.rsindex 538571f25c4..30ed10a76fb 100644--- a/crates/collab/src/api/events.rs+++ b/crates/collab/src/api/events.rs@@ -1326,9 +1326,7 @@ impl ActionEventRow {}pub fn calculate_json_checksum(app: Arc<AppState>, json: &impl AsRef<[u8]>) -> Option<Vec<u8>> {- let Some(checksum_seed) = app.config.zed_client_checksum_seed.as_ref() else {- return None;- };+ let checksum_seed = app.config.zed_client_checksum_seed.as_ref()?;let mut summer = Sha256::new();summer.update(checksum_seed);diff --git a/crates/collab/src/api/extensions.rs b/crates/collab/src/api/extensions.rsindex 2421349f470..deeb0bb56e8 100644--- a/crates/collab/src/api/extensions.rs+++ b/crates/collab/src/api/extensions.rs@@ -52,7 +52,7 @@ async fn get_extensions(let extension_id = filter.to_lowercase();let mut exact_match = None;extensions.retain(|extension| {- if extension.id.as_ref() == &extension_id {+ if extension.id.as_ref() == extension_id {exact_match = Some(extension.clone());false} else {diff --git a/crates/collab/src/db/queries/buffers.rs b/crates/collab/src/db/queries/buffers.rsindex df85ba3a728..7b19dee3154 100644--- a/crates/collab/src/db/queries/buffers.rs+++ b/crates/collab/src/db/queries/buffers.rs@@ -872,7 +872,7 @@ fn operation_from_storage(})}-fn version_to_storage(version: &Vec<proto::VectorClockEntry>) -> Vec<storage::VectorClockEntry> {+fn version_to_storage(version: &[proto::VectorClockEntry]) -> Vec<storage::VectorClockEntry> {version.iter().map(|entry| storage::VectorClockEntry {@@ -882,7 +882,7 @@ fn version_to_storage(version: &Vec<proto::VectorClockEntry>) -> Vec<storage::Ve.collect()}-fn version_from_storage(version: &Vec<storage::VectorClockEntry>) -> Vec<proto::VectorClockEntry> {+fn version_from_storage(version: &[storage::VectorClockEntry]) -> Vec<proto::VectorClockEntry> {version.iter().map(|entry| proto::VectorClockEntry {diff --git a/crates/collab/src/db/queries/dev_server_projects.rs b/crates/collab/src/db/queries/dev_server_projects.rsindex 9312811335a..dae550b6680 100644--- a/crates/collab/src/db/queries/dev_server_projects.rs+++ b/crates/collab/src/db/queries/dev_server_projects.rs@@ -146,11 +146,11 @@ impl Database {pub async fn update_dev_server_project(&self,id: DevServerProjectId,- paths: &Vec<String>,+ paths: &[String],user_id: UserId,) -> crate::Result<(dev_server_project::Model, proto::DevServerProjectsUpdate)> {self.transaction(move |tx| async move {- let paths = paths.clone();+ let paths = paths.to_owned();let Some((project, Some(dev_server))) = dev_server_project::Entity::find_by_id(id).find_also_related(dev_server::Entity).one(&*tx)diff --git a/crates/collab/src/db/queries/hosted_projects.rs b/crates/collab/src/db/queries/hosted_projects.rsindex 9ddafe3be1b..eb38eaa9cca 100644--- a/crates/collab/src/db/queries/hosted_projects.rs+++ b/crates/collab/src/db/queries/hosted_projects.rs@@ -5,7 +5,7 @@ use super::*;impl Database {pub async fn get_hosted_projects(&self,- channel_ids: &Vec<ChannelId>,+ channel_ids: &[ChannelId],roles: &HashMap<ChannelId, ChannelRole>,tx: &DatabaseTransaction,) -> Result<Vec<proto::HostedProject>> {diff --git a/crates/collab/src/main.rs b/crates/collab/src/main.rsindex 81e450e0daf..0e6bb67d13d 100644--- a/crates/collab/src/main.rs+++ b/crates/collab/src/main.rs@@ -88,7 +88,7 @@ async fn main() -> Result<()> {.route("/healthz", get(handle_liveness_probe)).layer(Extension(mode));- let listener = TcpListener::bind(&format!("0.0.0.0:{}", config.http_port))+ let listener = TcpListener::bind(format!("0.0.0.0:{}", config.http_port)).expect("failed to bind TCP listener");let mut on_shutdown = None;diff --git a/crates/collab_ui/src/chat_panel/message_editor.rs b/crates/collab_ui/src/chat_panel/message_editor.rsindex 7f7bf405d9d..028e148cbac 100644--- a/crates/collab_ui/src/chat_panel/message_editor.rs+++ b/crates/collab_ui/src/chat_panel/message_editor.rs@@ -346,7 +346,7 @@ impl MessageEditor {) -> Option<(Anchor, String, Vec<StringMatchCandidate>)> {let end_offset = end_anchor.to_offset(buffer.read(cx));- let Some(query) = buffer.update(cx, |buffer, _| {+ let query = buffer.update(cx, |buffer, _| {let mut query = String::new();for ch in buffer.reversed_chars_at(end_offset).take(100) {if ch == '@' {@@ -358,9 +358,7 @@ impl MessageEditor {query.push(ch);}None- }) else {- return None;- };+ })?;let start_offset = end_offset - query.len();let start_anchor = buffer.read(cx).anchor_before(start_offset);@@ -414,7 +412,7 @@ impl MessageEditor {let end_offset = end_anchor.to_offset(buffer.read(cx));- let Some(query) = buffer.update(cx, |buffer, _| {+ let query = buffer.update(cx, |buffer, _| {let mut query = String::new();for ch in buffer.reversed_chars_at(end_offset).take(100) {if ch == ':' {@@ -450,9 +448,7 @@ impl MessageEditor {query.push(ch);}None- }) else {- return None;- };+ })?;let start_offset = end_offset - query.len() - 1;let start_anchor = buffer.read(cx).anchor_before(start_offset);diff --git a/crates/file_finder/src/file_finder.rs b/crates/file_finder/src/file_finder.rsindex c44da084ced..50a14b62dbb 100644--- a/crates/file_finder/src/file_finder.rs+++ b/crates/file_finder/src/file_finder.rs@@ -448,7 +448,7 @@ fn history_file_exists(abs_path: &PathBuf) -> bool {}#[cfg(test)]-fn history_file_exists(abs_path: &PathBuf) -> bool {+fn history_file_exists(abs_path: &Path) -> bool {!abs_path.ends_with("nonexistent.rs")}diff --git a/crates/file_finder/src/file_finder_tests.rs b/crates/file_finder/src/file_finder_tests.rsindex 25ed9fcd399..8e25d382d38 100644--- a/crates/file_finder/src/file_finder_tests.rs+++ b/crates/file_finder/src/file_finder_tests.rs@@ -2012,7 +2012,7 @@ fn init_test(cx: &mut TestAppContext) -> Arc<AppState> {}fn test_path_position(test_str: &str) -> FileSearchQuery {- let path_position = PathWithPosition::parse_str(&test_str);+ let path_position = PathWithPosition::parse_str(test_str);FileSearchQuery {raw_query: test_str.to_owned(),diff --git a/crates/file_finder/src/open_path_prompt.rs b/crates/file_finder/src/open_path_prompt.rsindex 2628fe81ce1..5d977d10b98 100644--- a/crates/file_finder/src/open_path_prompt.rs+++ b/crates/file_finder/src/open_path_prompt.rs@@ -181,7 +181,7 @@ impl PickerDelegate for OpenPathDelegate {}let matches = fuzzy::match_strings(- &match_candidates.as_slice(),+ match_candidates.as_slice(),&suffix,false,100,diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rsindex 21f93111e95..05c10b884ad 100644--- a/crates/language/src/buffer.rs+++ b/crates/language/src/buffer.rs@@ -4301,7 +4301,7 @@ pub fn trailing_whitespace_ranges(rope: &Rope) -> Vec<Range<usize>> {let mut prev_line_trailing_whitespace_range = 0..0;for (i, line) in chunk.split('\n').enumerate() {let line_end_offset = offset + line.len();- let trimmed_line_len = line.trim_end_matches(|c| matches!(c, ' ' | '\t')).len();+ let trimmed_line_len = line.trim_end_matches([' ', '\t']).len();let mut trailing_whitespace_range = (offset + trimmed_line_len)..line_end_offset;if i == 0 && trimmed_line_len == 0 {diff --git a/crates/languages/src/go.rs b/crates/languages/src/go.rsindex 5d42337e013..c22a4e3eda9 100644--- a/crates/languages/src/go.rs+++ b/crates/languages/src/go.rs@@ -145,7 +145,7 @@ impl super::LspAdapter for GoLspAdapter {let this = *self;if let Some(version) = *version {- let binary_path = container_dir.join(&format!("gopls_{version}"));+ let binary_path = container_dir.join(format!("gopls_{version}"));if let Ok(metadata) = fs::metadata(&binary_path).await {if metadata.is_file() {remove_matching(&container_dir, |entry| {@@ -198,7 +198,7 @@ impl super::LspAdapter for GoLspAdapter {.find(version_stdout).with_context(|| format!("failed to parse golps version output '{version_stdout}'"))?.as_str();- let binary_path = container_dir.join(&format!("gopls_{version}"));+ let binary_path = container_dir.join(format!("gopls_{version}"));fs::rename(&installed_binary_path, &binary_path).await?;Ok(LanguageServerBinary {diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rsindex a56651785ab..0d109ce1a8e 100644--- a/crates/project/src/lsp_store.rs+++ b/crates/project/src/lsp_store.rs@@ -5601,14 +5601,14 @@ impl LspStore {{if let Some(watched_paths) = self.language_server_watched_paths- .get(&server_id)+ .get(server_id).and_then(|paths| paths.read(cx).worktree_paths.get(&worktree_id)){let params = lsp::DidChangeWatchedFilesParams {changes: changes.iter().filter_map(|(path, _, change)| {- if !watched_paths.is_match(&path) {+ if !watched_paths.is_match(path) {return None;}let typ = match change {diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rsindex c32c1734763..182cec4614d 100644--- a/crates/recent_projects/src/recent_projects.rs+++ b/crates/recent_projects/src/recent_projects.rs@@ -388,9 +388,7 @@ impl PickerDelegate for RecentProjectsDelegate {selected: bool,cx: &mut ViewContext<Picker<Self>>,) -> Option<Self::ListItem> {- let Some(hit) = self.matches.get(ix) else {- return None;- };+ let hit = self.matches.get(ix)?;let (_, location) = self.workspaces.get(hit.candidate_id)?;diff --git a/crates/remote/src/ssh_session.rs b/crates/remote/src/ssh_session.rsindex 6f6c2618111..91f7b330e4a 100644--- a/crates/remote/src/ssh_session.rs+++ b/crates/remote/src/ssh_session.rs@@ -156,7 +156,7 @@ impl SshSession {run_cmd(socket.ssh_command(&remote_binary_path).arg("version")).await?;let mut remote_server_child = socket- .ssh_command(&format!(+ .ssh_command(format!("RUST_LOG={} {:?} run",std::env::var("RUST_LOG").unwrap_or_default(),remote_binary_path,@@ -661,7 +661,7 @@ impl SshClientState {.unwrap_or_default(),).arg(src_path)- .arg(&format!(+ .arg(format!("{}:{}",self.socket.connection_options.scp_url(),dest_path.display()diff --git a/crates/storybook/src/stories/picker.rs b/crates/storybook/src/stories/picker.rsindex ca156ba7306..5336b63e492 100644--- a/crates/storybook/src/stories/picker.rs+++ b/crates/storybook/src/stories/picker.rs@@ -51,9 +51,7 @@ impl PickerDelegate for Delegate {selected: bool,_cx: &mut gpui::ViewContext<Picker<Self>>,) -> Option<Self::ListItem> {- let Some(candidate_ix) = self.matches.get(ix) else {- return None;- };+ let candidate_ix = self.matches.get(ix)?;// TASK: Make StringMatchCandidate::string a SharedStringlet candidate = SharedString::from(self.candidates[*candidate_ix].string.clone());diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rsindex 9e694c32e93..224e660f5f2 100644--- a/crates/terminal/src/terminal.rs+++ b/crates/terminal/src/terminal.rs@@ -1889,16 +1889,15 @@ mod tests {cells}- fn convert_cells_to_content(size: TerminalSize, cells: &Vec<Vec<char>>) -> TerminalContent {+ fn convert_cells_to_content(size: TerminalSize, cells: &[Vec<char>]) -> TerminalContent {let mut ic = Vec::new();- for row in 0..cells.len() {- for col in 0..cells[row].len() {- let cell_char = cells[row][col];+ for (index, row) in cells.iter().enumerate() {+ for (cell_index, cell_char) in row.iter().enumerate() {ic.push(IndexedCell {- point: AlacPoint::new(Line(row as i32), Column(col)),+ point: AlacPoint::new(Line(index as i32), Column(cell_index)),cell: Cell {- c: cell_char,+ c: *cell_char,..Default::default()},});diff --git a/crates/theme_importer/src/vscode/syntax.rs b/crates/theme_importer/src/vscode/syntax.rsindex 1a8df535bbb..a611519eeb9 100644--- a/crates/theme_importer/src/vscode/syntax.rs+++ b/crates/theme_importer/src/vscode/syntax.rs@@ -190,7 +190,7 @@ impl ZedSyntaxToken {}}- pub fn to_vscode(&self) -> Vec<&'static str> {+ fn to_vscode(self) -> Vec<&'static str> {match self {ZedSyntaxToken::Attribute => vec!["entity.other.attribute-name"],ZedSyntaxToken::Boolean => vec!["constant.language"],diff --git a/crates/ui/src/components/button.rs b/crates/ui/src/components/button.rsindex 71aaf7780cc..68e72253a5b 100644--- a/crates/ui/src/components/button.rs+++ b/crates/ui/src/components/button.rs@@ -1,5 +1,5 @@mod button;-pub(self) mod button_icon;+mod button_icon;mod button_like;mod icon_button;mod toggle_button;diff --git a/crates/ui/src/components/list/list.rs b/crates/ui/src/components/list/list.rsindex 478a906def7..a09abf92e45 100644--- a/crates/ui/src/components/list/list.rs+++ b/crates/ui/src/components/list/list.rs@@ -13,6 +13,12 @@ pub struct List {children: SmallVec<[AnyElement; 2]>,}+impl Default for List {+ fn default() -> Self {+ Self::new()+ }+}+impl List {pub fn new() -> Self {Self {diff --git a/crates/vim/src/command.rs b/crates/vim/src/command.rsindex a663fc9165e..06c5f0bd3fc 100644--- a/crates/vim/src/command.rs+++ b/crates/vim/src/command.rs@@ -202,9 +202,7 @@ impl VimCommand {query = &query[..query.len() - 1];}- let Some(suffix) = query.strip_prefix(self.prefix) else {- return None;- };+ let suffix = query.strip_prefix(self.prefix)?;if !self.suffix.starts_with(suffix) {return None;}diff --git a/crates/vim/src/normal/search.rs b/crates/vim/src/normal/search.rsindex 66c78af5edf..28f33d49d85 100644--- a/crates/vim/src/normal/search.rs+++ b/crates/vim/src/normal/search.rs@@ -135,9 +135,7 @@ impl Vim {self.store_visual_marks(cx);let Some(pane) = self.pane(cx) else { return };let result = pane.update(cx, |pane, cx| {- let Some(search_bar) = pane.toolbar().read(cx).item_of_type::<BufferSearchBar>() else {- return None;- };+ let search_bar = pane.toolbar().read(cx).item_of_type::<BufferSearchBar>()?;search_bar.update(cx, |search_bar, cx| {let mut count = self.search.count;let direction = self.search.direction;@@ -420,12 +418,9 @@ impl Replacement {// but we do flip \( and \) to ( and ) (and vice-versa) in the pattern,// and convert \0..\9 to $0..$9 in the replacement so that common idioms work.pub(crate) fn parse(mut chars: Peekable<Chars>) -> Option<Replacement> {- let Some(delimiter) = chars+ let delimiter = chars.next()- .filter(|c| !c.is_alphanumeric() && *c != '"' && *c != '|' && *c != '\'')- else {- return None;- };+ .filter(|c| !c.is_alphanumeric() && *c != '"' && *c != '|' && *c != '\'')?;let mut search = String::new();let mut replacement = String::new();diff --git a/crates/vim/src/object.rs b/crates/vim/src/object.rsindex cda49f7d2a8..9f8e8366a72 100644--- a/crates/vim/src/object.rs+++ b/crates/vim/src/object.rs@@ -875,9 +875,7 @@ fn surrounding_markers(}}- let Some(mut opening) = opening else {- return None;- };+ let mut opening = opening?;let mut matched_opens = 0;let mut closing = None;@@ -905,9 +903,7 @@ fn surrounding_markers(before_ch = ch;}- let Some(mut closing) = closing else {- return None;- };+ let mut closing = closing?;if around && !search_across_lines {let mut found = false;diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rsindex 401eaf30a4e..284baddf663 100644--- a/crates/zed/src/main.rs+++ b/crates/zed/src/main.rs@@ -1075,10 +1075,9 @@ fn parse_url_arg(arg: &str, cx: &AppContext) -> Result<String> {if arg.starts_with("file://")|| arg.starts_with("zed-cli://")|| arg.starts_with("ssh://")+ || parse_zed_link(arg, cx).is_some(){Ok(arg.into())- } else if parse_zed_link(arg, cx).is_some() {- Ok(arg.into())} else {Err(anyhow!("error parsing path argument: {}", error))}diff --git a/crates/zed/src/zed/open_listener.rs b/crates/zed/src/zed/open_listener.rsindex 019bf37e771..c5fd2b2e78e 100644--- a/crates/zed/src/zed/open_listener.rs+++ b/crates/zed/src/zed/open_listener.rs@@ -189,7 +189,7 @@ fn connect_to_cli(}pub async fn open_paths_with_positions(- path_positions: &Vec<PathWithPosition>,+ path_positions: &[PathWithPosition],app_state: Arc<AppState>,open_options: workspace::OpenOptions,cx: &mut AsyncAppContext,