summaryrefslogtreecommitdiff
path: root/subplotlib-derive
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-12-20 17:17:38 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-12-21 08:39:33 +0000
commit9ebdb81cfe6b479ff723df9366e1399598288b1f (patch)
tree19ac429f4187575582f8c111a6ac965eb16bd638 /subplotlib-derive
parentc25d2a1991bf436bc17161325b677a39853529b4 (diff)
downloadsubplot-9ebdb81cfe6b479ff723df9366e1399598288b1f.tar.gz
rust: Handle poison differently for cleanups
When cleanup functions are run, permit them to run with poisoned contexts. Cleanup functions will have to be resilient to this risk. If cleanup functions fail then the test will panic properly. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'subplotlib-derive')
-rw-r--r--subplotlib-derive/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/subplotlib-derive/src/lib.rs b/subplotlib-derive/src/lib.rs
index 0e7e267..0a0f4f1 100644
--- a/subplotlib-derive/src/lib.rs
+++ b/subplotlib-derive/src/lib.rs
@@ -271,7 +271,7 @@ fn process_step(input: ItemFn) -> proc_macro2::TokenStream {
}
} else {
quote! {
- ctx.#withfn (|ctx| #stepname(ctx, #(#buildargs),*),false)
+ ctx.#withfn (|ctx| #stepname(ctx, #(#buildargs),*), _defuse_poison)
}
};
@@ -280,7 +280,7 @@ fn process_step(input: ItemFn) -> proc_macro2::TokenStream {
#(#fieldfns)*
pub fn build(self) -> ScenarioStep {
- ScenarioStep::new(#stepnamestr, move |ctx|
+ ScenarioStep::new(#stepnamestr, move |ctx, _defuse_poison|
#builder_body
)
}