Skip to content

Commit a30d3bf

Browse files
committed
fix(tryfn)!: Remove Action overriding, deferring to Assert overriding
1 parent c736e03 commit a30d3bf

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

crates/tryfn/src/lib.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
4242
use libtest_mimic::Trial;
4343

44-
pub use snapbox::assert::Action;
4544
pub use snapbox::data::DataFormat;
4645
pub use snapbox::Data;
4746

@@ -102,19 +101,11 @@ where
102101
self
103102
}
104103

105-
/// Read the failure action from an environment variable
106-
pub fn action_env(mut self, var_name: &str) -> Self {
107-
self.config = self.config.action_env(var_name);
108-
self
109-
}
110-
111-
/// Override the failure action
112-
pub fn action(mut self, action: Action) -> Self {
113-
self.config = self.config.action(action);
114-
self
115-
}
116-
117104
/// Customize the assertion behavior
105+
///
106+
/// Includes
107+
/// - Configuring redactions
108+
/// - Override updating environment vaeiable
118109
pub fn with_assert(mut self, config: snapbox::Assert) -> Self {
119110
self.config = config;
120111
self
@@ -156,7 +147,9 @@ where
156147
config.try_eq(case.expected.clone(), actual, Some(&case.name))?;
157148
Ok(())
158149
})
159-
.with_ignored_flag(shared_config.selected_action() == Action::Ignore)
150+
.with_ignored_flag(
151+
shared_config.selected_action() == snapbox::assert::Action::Ignore,
152+
)
160153
})
161154
.collect();
162155

0 commit comments

Comments
 (0)