Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mitsuhiko/insta
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.18.1
Choose a base ref
...
head repository: mitsuhiko/insta
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.18.2
Choose a head ref
  • 2 commits
  • 6 files changed
  • 1 contributor

Commits on Aug 11, 2022

  1. Verified

    This commit was signed with the committer’s verified signature.
    romtsn Roman Zavarnitsyn
    Copy the full SHA
    d4ab2ab View commit details
  2. 1.18.2

    mitsuhiko committed Aug 11, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    romtsn Roman Zavarnitsyn
    Copy the full SHA
    3f6e91b View commit details
Showing with 15 additions and 9 deletions.
  1. +4 −0 CHANGELOG.md
  2. +1 −1 Cargo.toml
  3. +2 −2 cargo-insta/Cargo.lock
  4. +2 −2 cargo-insta/Cargo.toml
  5. +2 −2 src/lib.rs
  6. +4 −2 src/macros.rs
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,10 @@

All notable changes to insta and cargo-insta are documented here.

## 1.18.2

- Avoid the use of `#[allow(unused)]` in the macro. (#271)

## 1.18.1

- Fixed a regression in the JSON serialization format with newtypes and
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "insta"
version = "1.18.1"
version = "1.18.2"
license = "Apache-2.0"
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
description = "A snapshot testing library for Rust"
4 changes: 2 additions & 2 deletions cargo-insta/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cargo-insta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-insta"
version = "1.18.1"
version = "1.18.2"
license = "Apache-2.0"
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
description = "A review tool for the insta snapshot testing library for Rust"
@@ -12,7 +12,7 @@ edition = "2018"
readme = "README.md"

[dependencies]
insta = { version = "=1.18.1", path = "..", features = ["json", "yaml", "redactions"] }
insta = { version = "=1.18.2", path = "..", features = ["json", "yaml", "redactions"] }
console = "0.15.1"
structopt = "0.3.20"
serde = { version = "1.0.117", features = ["derive"] }
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -291,7 +291,7 @@ pub mod _macro_support {
)
)]
pub mod deprecated_backtrace_support {
pub const _BACKTRACE_DUMMY: usize = 0;
pub fn backtrace_dummy() {}
}

#[doc(hidden)]
@@ -308,5 +308,5 @@ pub mod deprecated_backtrace_support {
)
)]
pub mod deprecated_serialization_support {
pub const _SERIALIZATION_DUMMY: usize = 0;
pub fn serialization_dummy() {}
}
6 changes: 4 additions & 2 deletions src/macros.rs
Original file line number Diff line number Diff line change
@@ -418,11 +418,13 @@ macro_rules! assert_snapshot {
};
($name:expr, $value:expr, $debug_expr:expr) => {{
// This use does not do anything. It exists purely to trigger a deprecation warning
// for the features if enabled.
#[allow(unused)]
// for the features if enabled. The dummy function calls exist so that we do not
// need to use `#[allow(unused)]` (https://github.com/mitsuhiko/insta/issues/271)
{
use $crate::deprecated_backtrace_support::*;
use $crate::deprecated_serialization_support::*;
backtrace_dummy();
serialization_dummy();
}

$crate::_macro_support::assert_snapshot(