Skip to content

Commit

Permalink
misc: Apply clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Luni-4 committed Dec 9, 2024
1 parent 21cb39d commit 9e01547
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/colorize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ where
} else {
assert!(
([" ", "-", "+", "~"].contains(&op)),
"Unexpected op '{}'",
op
"Unexpected op '{op}'"
);
let subvalue = subvalue.unwrap();
let color = if op == "~" { " " } else { op };
Expand Down
3 changes: 1 addition & 2 deletions src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ impl JsonDiff {
for key in seq1.iter().take(opcode.first_end).skip(opcode.first_start) {
let is_scalarized1 = Self::is_scalarized(key, &originals1);
assert!(!is_scalarized1 || (Self::is_scalarized(key, &originals2)),
"Internal bug: the items associated to the key {} are different in the two dictionaries",
key
"Internal bug: the items associated to the key {key} are different in the two dictionaries"
);
if is_scalarized1 {
let item1 = Self::descalarize(key, &scalar_values1, &originals1);
Expand Down

0 comments on commit 9e01547

Please sign in to comment.