Make Project::save_buffer and ::save_buffers into methods

This commit is contained in:
Max Brunsfeld 2023-02-20 09:42:44 -08:00
parent 56b7eb6b6f
commit 010eba509c
5 changed files with 25 additions and 16 deletions

View file

@ -2244,7 +2244,7 @@ async fn test_propagate_saves_and_fs_changes(
});
// Edit the buffer as the host and concurrently save as guest B.
let save_b = cx_b.update(|cx| Project::save_buffer(buffer_b.clone(), cx));
let save_b = project_b.update(cx_b, |project, cx| project.save_buffer(buffer_b.clone(), cx));
buffer_a.update(cx_a, |buf, cx| buf.edit([(0..0, "hi-a, ")], None, cx));
save_b.await.unwrap();
assert_eq!(
@ -2917,7 +2917,7 @@ async fn test_buffer_conflict_after_save(
assert!(!buf.has_conflict());
});
cx_b.update(|cx| Project::save_buffer(buffer_b.clone(), cx))
project_b.update(cx_b, |project, cx| project.save_buffer(buffer_b.clone(), cx))
.await
.unwrap();
cx_a.foreground().forbid_parking();