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.6.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.6.2
Choose a head ref
  • 8 commits
  • 9 files changed
  • 1 contributor

Commits on Feb 15, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    710f741 View commit details
  2. Support Rust 1.41.0

    mitsuhiko committed Feb 15, 2021
    Copy the full SHA
    07876f8 View commit details
  3. Copy the full SHA
    9486383 View commit details
  4. Make tests pass on 1.41.0

    mitsuhiko committed Feb 15, 2021
    Copy the full SHA
    2b192f1 View commit details
  5. Bump similar to 1.2.2

    mitsuhiko committed Feb 15, 2021
    Copy the full SHA
    9b9042d View commit details
  6. Fix a formatting bug

    mitsuhiko committed Feb 15, 2021
    Copy the full SHA
    17cd85c View commit details
  7. Copy the full SHA
    16f0fda View commit details
  8. 1.6.2

    mitsuhiko committed Feb 15, 2021
    Copy the full SHA
    b974710 View commit details
Showing with 35 additions and 14 deletions.
  1. +3 −3 .github/workflows/tests.yml
  2. +4 −0 CHANGELOG.md
  3. +2 −2 Cargo.toml
  4. +13 −0 Makefile
  5. +4 −4 cargo-insta/Cargo.lock
  6. +2 −2 cargo-insta/Cargo.toml
  7. +1 −1 clippy.toml
  8. +5 −1 src/content.rs
  9. +1 −1 src/runtime.rs
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -18,15 +18,15 @@ jobs:
run: make test

build-stable:
name: Test on 1.43.0
name: Test on 1.41.0
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.43.0
toolchain: 1.41.0
profile: minimal
override: true
- name: Test
run: make test
run: make test-141
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.6.2

* Lower Rust support to 1.41.0 (#165)

## 1.6.1

* Bump similar dependency to reintroduce support for Rust 1.43.0 (#162)
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "insta"
version = "1.6.1"
version = "1.6.2"
license = "Apache-2.0"
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
description = "A snapshot testing library for Rust"
@@ -47,4 +47,4 @@ toml = { version = "0.5.7", optional = true }
globset = { version = "0.4.6", optional = true }
walkdir = { version = "2.3.1", optional = true }
uuid = "0.8.1"
similar = { version = "1.2.1", features = ["inline"] }
similar = { version = "1.2.2", features = ["inline"] }
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@ doc:

test: cargotest cargo-insta-tests

test-141: cargotest-141

cargo-insta-tests:
@echo "CARGO-INSTA INTEGRATION TESTS"
@cd cargo-insta/integration-tests; cargo run
@@ -21,6 +23,17 @@ cargotest:
@cargo test --features redactions,backtrace -- --test-threads 1
@cd cargo-insta; cargo test

cargotest-141:
# This can't run the tests against backtrace as this feature no longer works
# on Rust 1.41.0
@echo "CARGO TESTS 1.41.0"
@rustup component add rustfmt 2> /dev/null
@cargo test
@cargo test --features redactions,glob
@cargo test --features redactions
@cargo test --no-default-features
@cd cargo-insta; cargo test

format:
@rustup component add rustfmt 2> /dev/null
@cargo fmt --all
8 changes: 4 additions & 4 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.6.1"
version = "1.6.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.6.1", path = "..", features = ["redactions"] }
insta = { version = "1.6.2", path = "..", features = ["redactions"] }
console = "0.14.0"
clap = { version = "2.33.3", default-features = false }
difference = "2.0.0"
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
msrv = "1.42.0"
msrv = "1.41.0"
6 changes: 5 additions & 1 deletion src/content.rs
Original file line number Diff line number Diff line change
@@ -192,7 +192,11 @@ impl Content {

/// Returns true if the value is nil.
pub fn is_nil(&self) -> bool {
matches!(self.resolve_inner(), Content::None | Content::Unit)
if let Content::None | Content::Unit = self.resolve_inner() {
true
} else {
false
}
}

pub(crate) fn as_key(&self) -> Key<'_> {
2 changes: 1 addition & 1 deletion src/runtime.rs
Original file line number Diff line number Diff line change
@@ -241,7 +241,7 @@ fn print_changeset(old: &str, new: &str, expr: Option<&str>) {
}
ChangeTag::Delete => {
has_changes = true;
println!(
print!(
"{:>5} {:>5} │{}",
style(change.old_index().unwrap()).cyan().dim(),
"",