mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-22 12:54:54 +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(
|
||||
&mut self,
|
||||
mut resource: Option<(
|
||||
resource: Option<(
|
||||
(crate::Client, crate::Workspace, crate::buffer::Controller),
|
||||
(crate::Client, crate::Workspace, crate::buffer::Controller),
|
||||
)>,
|
||||
) {
|
||||
if let Some(((_, ws, buf), (_, _, _))) = resource.take() {
|
||||
if let Err(e) = ws.delete_buffer(buf.path()).await {
|
||||
eprintln!("could not delete buffer: {e:?}");
|
||||
if let Some(((client, _, _), (_, _, _))) = resource {
|
||||
// buffer deletion is implied in workspace deletion
|
||||
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