Tidy up the code (#12116)

Small follow-ups for https://github.com/zed-industries/zed/pull/12063
and https://github.com/zed-industries/zed/pull/12103

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov
2024-05-22 14:36:15 +03:00
committed by GitHub
parent c440f3a71b
commit c4e87444e7
9 changed files with 130 additions and 104 deletions
+6 -3
View File
@@ -384,8 +384,9 @@ mod tests {
assert_eq!(
resolved_task(&task_without_cwd, &cx)
.cwd
.as_ref()
.and_then(|cwd| cwd.local_path()),
Some(context_cwd.clone()),
Some(context_cwd.as_path()),
"TaskContext's cwd should be taken on resolve if task's cwd is None"
);
@@ -401,8 +402,9 @@ mod tests {
assert_eq!(
resolved_task(&task_with_cwd, &cx)
.cwd
.as_ref()
.and_then(|cwd| cwd.local_path()),
Some(task_cwd.clone()),
Some(task_cwd.as_path()),
"TaskTemplate's cwd should be taken on resolve if TaskContext's cwd is None"
);
@@ -413,8 +415,9 @@ mod tests {
assert_eq!(
resolved_task(&task_with_cwd, &cx)
.cwd
.as_ref()
.and_then(|cwd| cwd.local_path()),
Some(task_cwd.clone()),
Some(task_cwd.as_path()),
"TaskTemplate's cwd should be taken on resolve if TaskContext's cwd is not None"
);
}