mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-03-31 16:23:08 +00:00
Ensure runners clean up attached resources on drop
This commit is contained in:
parent
d4c5b9fe99
commit
d34ac87411
@ -27,6 +27,12 @@ pub struct Runner<E: Application> {
|
||||
cleanup_guard: Option<Box<dyn CleanupGuard>>,
|
||||
}
|
||||
|
||||
impl<E: Application> Drop for Runner<E> {
|
||||
fn drop(&mut self) {
|
||||
self.cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: Application> Runner<E> {
|
||||
/// Construct a runner from the run context and optional cleanup guard.
|
||||
#[must_use]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user