diff --git a/.vscode/launch.json b/.vscode/launch.json index 68fd885cf2..aea73eeaa2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,15 +7,15 @@ { "type": "lldb", "request": "launch", - "name": "Debug executable 'zed'", + "name": "Debug executable 'Zed'", "cargo": { "args": [ "build", - "--bin=zed", + "--bin=Zed", "--package=zed" ], "filter": { - "name": "zed", + "name": "Zed", "kind": "bin" } }, @@ -63,4 +63,4 @@ "cwd": "${workspaceFolder}" } ] -} +} \ No newline at end of file diff --git a/zed/src/worktree/worktree.rs b/zed/src/worktree/worktree.rs index 7d1d769593..1ddc85ac93 100644 --- a/zed/src/worktree/worktree.rs +++ b/zed/src/worktree/worktree.rs @@ -444,12 +444,12 @@ pub trait WorktreeHandle { impl WorktreeHandle for ModelHandle { fn file(&self, entry_id: u64, app: &AppContext) -> Result { if self.read(app).has_entry(entry_id) { - Err(anyhow!("entry does not exist in tree")) - } else { Ok(FileHandle { worktree: self.clone(), entry_id, }) + } else { + Err(anyhow!("entry does not exist in tree")) } } } @@ -719,11 +719,18 @@ mod test { app.read(|ctx| { let tree = tree.read(ctx); assert_eq!(tree.file_count(), 4); - let results = match_paths(&[tree.clone()], "bna", false, false, 10, ctx.scoped_pool().clone()) - .iter() - .map(|result| tree.entry_path(result.entry_id)) - .collect::, _>>() - .unwrap(); + let results = match_paths( + &[tree.clone()], + "bna", + false, + false, + 10, + ctx.scoped_pool().clone(), + ) + .iter() + .map(|result| tree.entry_path(result.entry_id)) + .collect::, _>>() + .unwrap(); assert_eq!( results, vec![