Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Replace equality condition of assert --> assert_eq #1455

Merged
merged 1 commit into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/settings/toml/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn it_builds_from_environments_config_with_kv() {
if target.kv_namespaces.is_empty() {
panic!("found no kv namespaces");
} else {
assert!(target.kv_namespaces.len() == 2);
assert_eq!(target.kv_namespaces.len(), 2);
assert!(target.kv_namespaces.contains(&kv_1));
assert!(target.kv_namespaces.contains(&kv_2));
}
Expand All @@ -70,7 +70,7 @@ fn it_builds_from_environments_config_with_kv() {
if target.kv_namespaces.is_empty() {
panic!("found no kv namespaces");
} else {
assert!(target.kv_namespaces.len() == 2);
assert_eq!(target.kv_namespaces.len(), 2);
assert!(target.kv_namespaces.contains(&kv_1));
assert!(target.kv_namespaces.contains(&kv_2));
}
Expand Down
6 changes: 3 additions & 3 deletions src/sites/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ mod tests {
}

fn check_kv_pairs_equality(expected: Vec<KeyValuePair>, actual: Vec<KeyValuePair>) {
assert!(expected.len() == actual.len());
assert_eq!(expected.len(), actual.len());
for (idx, pair) in expected.into_iter().enumerate() {
// Ensure the expected key and value was returned in the filtered pair list
// Awkward field-by-field comparison below courtesy of not yet implementing
// PartialEq for KeyValuePair in cloudflare-rs :)
// TODO: (gabbi) Implement PartialEq for KeyValuePair in cloudflare-rs.
assert!(pair.key == actual[idx].key);
assert!(pair.value == actual[idx].value);
assert_eq!(pair.key, actual[idx].key);
assert_eq!(pair.value, actual[idx].value);
}
}
}