Skip to content

Commit

Permalink
Merge #206
Browse files Browse the repository at this point in the history
206: Cleanup r=samueltardieu a=samueltardieu



Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
  • Loading branch information
bors[bot] and samueltardieu committed Jan 15, 2019
2 parents e5a3a1d + 435544f commit 59e50fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/connected-components.rs
Expand Up @@ -8,7 +8,7 @@ use std::usize;
#[test]
fn basic_separate_components() {
let (h, g) = separate_components(&[vec![1, 2], vec![3, 4], vec![5, 6], vec![1, 4]]);
assert!([1, 2, 3, 4].into_iter().map(|n| h[n]).all_equal());
assert!([1, 2, 3, 4].iter().map(|n| h[n]).all_equal());
assert_eq!(h[&5], h[&6]);
assert!(h[&1] != h[&5]);
assert_eq!(h.len(), 6);
Expand All @@ -21,7 +21,7 @@ fn basic_separate_components() {
#[test]
fn empty_separate_components() {
let (h, g) = separate_components(&[vec![1, 2], vec![3, 4], vec![], vec![1, 4]]);
assert!([1, 2, 3, 4].into_iter().map(|n| h[n]).all_equal());
assert!([1, 2, 3, 4].iter().map(|n| h[n]).all_equal());
assert_eq!(h.len(), 4);
assert_eq!(g[0], g[1]);
assert_eq!(g[0], g[3]);
Expand Down
2 changes: 1 addition & 1 deletion tests/matrix.rs
Expand Up @@ -293,7 +293,7 @@ fn neighbours() {
let m = matrix![[0, 1, 2], [3, 4, 5], [6, 7, 8]];
for r in 0..3 {
for c in 0..3 {
for diagonal in vec![false, true] {
for &diagonal in &[false, true] {
let mut neighbours = m.neighbours(&(r, c), diagonal).collect::<Vec<_>>();
neighbours.sort();
let mut manual = Vec::new();
Expand Down

0 comments on commit 59e50fd

Please sign in to comment.