Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkuiZhang committed Oct 17, 2024
1 parent ee3d3f3 commit 28fecdc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/project/src/terminals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl Project {
cx: &mut ModelContext<Self>,
) -> anyhow::Result<Model<Terminal>> {
let path = match &kind {
TerminalKind::Shell(path) => path.as_ref().map(|path| path.clone().into()),
TerminalKind::Shell(path) => path.as_ref().map(Clone::clone),
TerminalKind::Task(spawn_task) => {
if let Some(cwd) = &spawn_task.cwd {
Some(cwd.clone().into())
Expand Down
1 change: 0 additions & 1 deletion crates/workspace/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2091,7 +2091,6 @@ impl Workspace {
);
cx.spawn(|this, mut cx| async move {
if let Some(paths) = paths.await.log_err().flatten() {
let paths = paths.into_iter().map(|p| p.into()).collect();
let results = this
.update(&mut cx, |this, cx| {
this.open_paths(paths, OpenVisible::All, None, cx)
Expand Down
12 changes: 5 additions & 7 deletions crates/worktree/src/worktree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,11 @@ impl Worktree {
.await
.map(CreatedEntry::Included),
None => {
let abs_path = this
.update(&mut cx, |worktree, _| {
worktree
.absolutize(&relative_path)
.with_context(|| format!("absolutizing {relative_path:?}"))
})??
.into();
let abs_path = this.update(&mut cx, |worktree, _| {
worktree
.absolutize(&relative_path)
.with_context(|| format!("absolutizing {relative_path:?}"))
})??;
Ok(CreatedEntry::Excluded { abs_path })
}
}
Expand Down

0 comments on commit 28fecdc

Please sign in to comment.