diff --git a/crates/snapbox/src/action.rs b/crates/snapbox/src/assert/action.rs similarity index 100% rename from crates/snapbox/src/action.rs rename to crates/snapbox/src/assert/action.rs diff --git a/crates/snapbox/src/assert/mod.rs b/crates/snapbox/src/assert/mod.rs index 361aee55..64e3155a 100644 --- a/crates/snapbox/src/assert/mod.rs +++ b/crates/snapbox/src/assert/mod.rs @@ -1,3 +1,5 @@ +mod action; + #[cfg(feature = "color")] use anstream::panic; #[cfg(feature = "color")] @@ -6,7 +8,9 @@ use anstream::stderr; use std::io::stderr; use crate::filter::{Filter as _, FilterMatches, FilterNewlines, FilterPaths}; -use crate::Action; + +pub use action::Action; +pub use action::DEFAULT_ACTION_ENV; /// Snapshot assertion against a file's contents /// diff --git a/crates/snapbox/src/lib.rs b/crates/snapbox/src/lib.rs index f1257c92..4bd49a09 100644 --- a/crates/snapbox/src/lib.rs +++ b/crates/snapbox/src/lib.rs @@ -95,7 +95,6 @@ #![warn(clippy::print_stderr)] #![warn(clippy::print_stdout)] -mod action; mod error; mod macros; mod substitutions; @@ -111,8 +110,8 @@ pub mod utils; #[cfg(feature = "harness")] pub mod harness; -pub use action::Action; -pub use action::DEFAULT_ACTION_ENV; +#[deprecated(since = "0.5.11", note = "Replaced with `assert::Assert`")] +pub use assert::Action; pub use assert::Assert; pub use data::Data; pub use data::ToDebug; @@ -120,6 +119,9 @@ pub use error::Error; pub use snapbox_macros::debug; pub use substitutions::Substitutions; +#[deprecated(since = "0.5.11", note = "Replaced with `assert::DEFAULT_ACTION_ENV`")] +pub const DEFAULT_ACTION_ENV: &str = assert::DEFAULT_ACTION_ENV; + pub type Result = std::result::Result; /// Check if a value is the same as an expected value