mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-21 23:04:49 +01:00
fix: cleanup for buffer fixture
idk who made this?? it was already fixed in dev env, uncommitted Co-authored-by: cschen <cschen@codemp.dev> Co-authored-by: zaaarf <me@zaaarf.foo>
This commit is contained in:
parent
c42b091b63
commit
300f6620c0
1 changed files with 6 additions and 4 deletions
|
@ -237,14 +237,16 @@ impl
|
||||||
|
|
||||||
async fn cleanup(
|
async fn cleanup(
|
||||||
&mut self,
|
&mut self,
|
||||||
mut resource: Option<(
|
resource: Option<(
|
||||||
(crate::Client, crate::Workspace, crate::buffer::Controller),
|
(crate::Client, crate::Workspace, crate::buffer::Controller),
|
||||||
(crate::Client, crate::Workspace, crate::buffer::Controller),
|
(crate::Client, crate::Workspace, crate::buffer::Controller),
|
||||||
)>,
|
)>,
|
||||||
) {
|
) {
|
||||||
if let Some(((_, ws, buf), (_, _, _))) = resource.take() {
|
if let Some(((client, _, _), (_, _, _))) = resource {
|
||||||
if let Err(e) = ws.delete_buffer(buf.path()).await {
|
// buffer deletion is implied in workspace deletion
|
||||||
eprintln!("could not delete buffer: {e:?}");
|
client.leave_workspace(&self.workspace);
|
||||||
|
if let Err(e) = client.delete_workspace(&self.workspace).await {
|
||||||
|
eprintln!("could not delete workspace: {e}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue