fn validate_results(
        expected: Vec<(DependencyNode, Vec<DependencyNode>)>,
        mut actual: HashMap<DependencyNode, HashSet<DependencyNode>>,
    ) {
        let mut actual_sorted: Vec<(DependencyNode, Vec<DependencyNode>)> = actual
            .drain()
            .map(|(k, v)| {
                let mut new_vec = Vec::new();
                new_vec.extend(v.into_iter());
                new_vec.sort_unstable();
                (k, new_vec)
            })
            .collect();
        actual_sorted.sort_unstable();
        assert_eq!(expected, actual_sorted);
    }
/// Validates that actual looks like expected and panics if they don't.
/// `expected` must be sorted and so must the second member of each
/// tuple in the vec.
Validates that actual looks like expected and panics if they don't.
`expected` must be sorted and so must the second member of each
tuple in the vec.
Validates that actual looks like expected and panics if they don ' t . ` expected ` must be sorted and so must the second member of each tuple in the vec .
fn validate_results(
        expected: Vec<(DependencyNode, Vec<DependencyNode>)>,
        mut actual: HashMap<DependencyNode, HashSet<DependencyNode>>,
    ) {
        let mut actual_sorted: Vec<(DependencyNode, Vec<DependencyNode>)> = actual
            .drain()
            .map(|(k, v)| {
                let mut new_vec = Vec::new();
                new_vec.extend(v.into_iter());
                new_vec.sort_unstable();
                (k, new_vec)
            })
            .collect();
        actual_sorted.sort_unstable();
        assert_eq!(expected, actual_sorted);
    }
fn validate_results ( expected : Vec < ( DependencyNode , Vec < DependencyNode > ) > , mut actual : HashMap < DependencyNode , HashSet < DependencyNode > > , ) { let mut actual_sorted : Vec < ( DependencyNode , Vec < DependencyNode > ) > = actual . drain ( ) . map ( | ( k , v ) | { let mut new_vec = Vec :: new ( ) ; new_vec . extend ( v . into_iter ( ) ) ; new_vec . sort_unstable ( ) ; ( k , new_vec ) } ) . collect ( ) ; actual_sorted . sort_unstable ( ) ; assert_eq ! ( expected actual_sorted ) ; }
Validates that actual looks like expected and panics if they don't.
Validates that actual looks like expected and panics if they don ' t .
expected
Vec<(DependencyNode, Vec<DependencyNode>)>
actual
HashMap<DependencyNode, HashSet<DependencyNode>>
expected
Vec<(DependencyNode, Vec<DependencyNode>)>
actual
HashMap<DependencyNode, HashSet<DependencyNode>>