Skip to content

Commit

Permalink
fix(assert): Move Actions into assert mod
Browse files Browse the repository at this point in the history
Cherry pick 125d7c4ba3754dab55f1ecfc030184b56868cc710 (assert-rs#294)
  • Loading branch information
epage committed May 15, 2024
1 parent 2ec281a commit 5c96a90
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
File renamed without changes.
6 changes: 5 additions & 1 deletion crates/snapbox/src/assert/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
mod action;

#[cfg(feature = "color")]
use anstream::panic;
#[cfg(feature = "color")]
Expand All @@ -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
///
Expand Down
8 changes: 5 additions & 3 deletions crates/snapbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
#![warn(clippy::print_stderr)]
#![warn(clippy::print_stdout)]

mod action;
mod error;
mod macros;
mod substitutions;
Expand All @@ -111,15 +110,18 @@ 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;
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<T, E = Error> = std::result::Result<T, E>;

/// Check if a value is the same as an expected value
Expand Down

0 comments on commit 5c96a90

Please sign in to comment.