Skip to content
This repository was archived by the owner on Jun 8, 2025. It is now read-only.

Commit f49787b

Browse files
committed
crate name took, rename and apply clippy auto fix
1 parent 33f7585 commit f49787b

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ authors = [
66
]
77
categories = ["development-tools"]
88
description = "Easily compare two JSON values and get great output"
9-
homepage = "https://github.com/b-2u/json-diff"
9+
homepage = "https://github.com/b-2u/assert-json-same"
1010
keywords = ["serde_json", "json", "testing"]
1111
license = "MIT"
12-
name = "json-diff"
12+
name = "assert-json-same"
1313
readme = "README.md"
14-
repository = "https://github.com/b-2u/json-diff.git"
15-
documentation = "https://docs.rs/json-diff"
14+
repository = "https://github.com/b-2u/assert-json-same.git"
15+
documentation = "https://docs.rs/assert-json-same"
1616
edition = "2018"
1717

1818
[dependencies]

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
[![Crates.io](https://img.shields.io/crates/v/assert-json-diff.svg)](https://crates.io/crates/assert-json-diff)
2-
[![Docs](https://docs.rs/assert-json-diff/badge.svg)](https://docs.rs/assert-json-diff)
3-
[![dependency status](https://deps.rs/repo/github/davidpdrsn/assert-json-diff/status.svg)](https://deps.rs/repo/github/davidpdrsn/assert-json-diff)
4-
[![Build status](https://github.com/davidpdrsn/assert-json-diff/workflows/CI/badge.svg)](https://github.com/davidpdrsn/assert-json-diff/actions)
1+
[![Crates.io](https://img.shields.io/crates/v/assert-json-same.svg)](https://crates.io/crates/assert-json-same)
2+
[![Docs](https://docs.rs/assert-json-same/badge.svg)](https://docs.rs/assert-json-same)
3+
[![dependency status](https://deps.rs/repo/github/davidpdrsn/assert-json-same/status.svg)](https://deps.rs/repo/github/davidpdrsn/assert-json-same)
4+
[![Build status](https://github.com/davidpdrsn/assert-json-same/workflows/CI/badge.svg)](https://github.com/davidpdrsn/assert-json-same/actions)
55
![maintenance-status](https://img.shields.io/badge/maintenance-passively--maintained-yellowgreen.svg)
66

7-
# assert-json-diff
7+
# assert-json-same
88

99
This crate includes macros for comparing two serializable values by diffing their JSON
1010
representations. It is designed to give much more helpful error messages than the standard
@@ -23,7 +23,7 @@ If you want to assert that one JSON value is "included" in another use
2323
[`assert_json_include`](macro.assert_json_include.html):
2424

2525
```rust
26-
use json_diff::assert_json_include;
26+
use assert_json_same::assert_json_include;
2727
use serde_json::json;
2828

2929
let a = json!({
@@ -87,7 +87,7 @@ json atoms at path ".data.users[1].id" are not equal:
8787
of the JSON without having to specify the whole thing. For example this test passes:
8888

8989
```rust
90-
use json_diff::assert_json_include;
90+
use assert_json_same::assert_json_include;
9191
use serde_json::json;
9292

9393
assert_json_include!(
@@ -103,7 +103,7 @@ assert_json_include!(
103103
However `expected` cannot contain additional data so this test fails:
104104

105105
```rust
106-
use json_diff::assert_json_include;
106+
use assert_json_same::assert_json_include;
107107
use serde_json::json;
108108

109109
assert_json_include!(
@@ -127,7 +127,7 @@ json atom at path ".a.b" is missing from actual
127127
If you want to ensure two JSON values are *exactly* the same, use [`assert_json_eq`](macro.assert_json_eq.html).
128128

129129
```rust
130-
use json_diff::assert_json_eq;
130+
use assert_json_same::assert_json_eq;
131131
use serde_json::json;
132132

133133
assert_json_eq!(

src/diff.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ macro_rules! direct_compare {
5050
};
5151
}
5252

53-
impl<'a, 'b> DiffFolder<'a, 'b> {
53+
impl<'a> DiffFolder<'a, '_> {
5454
direct_compare!(on_null);
5555
direct_compare!(on_bool);
5656
direct_compare!(on_string);
@@ -215,7 +215,7 @@ pub struct Difference<'a> {
215215
config: Config,
216216
}
217217

218-
impl<'a> fmt::Display for Difference<'a> {
218+
impl fmt::Display for Difference<'_> {
219219
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
220220
let json_to_string = |json: &Value| serde_json::to_string_pretty(json).unwrap();
221221

@@ -304,7 +304,7 @@ impl<'a> Path<'a> {
304304
}
305305
}
306306

307-
impl<'a> fmt::Display for Path<'a> {
307+
impl fmt::Display for Path<'_> {
308308
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
309309
match self {
310310
Path::Root => write!(f, "(root)"),
@@ -353,7 +353,7 @@ impl<'a> From<Key<'a>> for KeyBuf {
353353
}
354354
}
355355

356-
impl<'a> fmt::Display for Key<'a> {
356+
impl fmt::Display for Key<'_> {
357357
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
358358
match self {
359359
Key::Idx(idx) => write!(f, "[{}]", idx),

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//! [`assert_json_include`](macro.assert_json_include.html):
1616
//!
1717
//! ```should_panic
18-
//! use json_diff::assert_json_include;
18+
//! use assert_json_same::assert_json_include;
1919
//! use serde_json::json;
2020
//!
2121
//! let a = json!({
@@ -79,7 +79,7 @@
7979
//! of the JSON without having to specify the whole thing. For example this test passes:
8080
//!
8181
//! ```
82-
//! use json_diff::assert_json_include;
82+
//! use assert_json_same::assert_json_include;
8383
//! use serde_json::json;
8484
//!
8585
//! assert_json_include!(
@@ -95,7 +95,7 @@
9595
//! However `expected` cannot contain additional data so this test fails:
9696
//!
9797
//! ```should_panic
98-
//! use json_diff::assert_json_include;
98+
//! use assert_json_same::assert_json_include;
9999
//! use serde_json::json;
100100
//!
101101
//! assert_json_include!(
@@ -119,7 +119,7 @@
119119
//! If you want to ensure two JSON values are *exactly* the same, use [`assert_json_eq`](macro.assert_json_eq.html).
120120
//!
121121
//! ```rust,should_panic
122-
//! use json_diff::assert_json_eq;
122+
//! use assert_json_same::assert_json_eq;
123123
//! use serde_json::json;
124124
//!
125125
//! assert_json_eq!(
@@ -195,7 +195,7 @@ macro_rules! assert_json_eq {
195195
/// Compare two JSON values according to a configuration.
196196
///
197197
/// ```
198-
/// use json_diff::{
198+
/// use assert_json_same::{
199199
/// CompareMode,
200200
/// Config,
201201
/// NumericMode,
@@ -220,7 +220,7 @@ macro_rules! assert_json_eq {
220220
/// `expected`. Example:
221221
///
222222
/// ```
223-
/// # use json_diff::{
223+
/// # use assert_json_same::{
224224
/// # CompareMode,
225225
/// # Config,
226226
/// # NumericMode,

tests/integration_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use json_diff::{
1+
use assert_json_same::{
22
assert_json_eq, assert_json_include, assert_json_matches,
33
assert_json_matches_no_panic_to_string, CompareMode, Config, NumericMode,
44
};

0 commit comments

Comments
 (0)