fn check_patch<'a, I>(patch: &Patch, changes: I)
    where
        I: IntoIterator<Item = (&'a str, Vec<u8>, Change)>,
    {
        use std::collections::BTreeSet;
        use std::iter::FromIterator;

        let mut patch_set: BTreeSet<(&str, _, _)> = BTreeSet::new();
        for (name, changes) in patch.iter() {
            for (key, value) in changes.iter() {
                patch_set.insert((name, key.clone(), OrdChange::from(value)));
            }
        }
        let expected_set = BTreeSet::from_iter(changes.into_iter().map(|(name, key, value)| {
            (name, key, OrdChange::from(value))
        }));
        assert_eq!(patch_set, expected_set);
    }
/// Asserts that a patch contains only the specified changes.
Asserts that a patch contains only the specified changes.
Asserts that a patch contains only the specified changes .
fn check_patch<'a, I>(patch: &Patch, changes: I)
    where
        I: IntoIterator<Item = (&'a str, Vec<u8>, Change)>,
    {
        use std::collections::BTreeSet;
        use std::iter::FromIterator;
        let mut patch_set: BTreeSet<(&str, _, _)> = BTreeSet::new();
        for (name, changes) in patch.iter() {
            for (key, value) in changes.iter() {
                patch_set.insert((name, key.clone(), OrdChange::from(value)));
            }
        }
        let expected_set = BTreeSet::from_iter(changes.into_iter().map(|(name, key, value)| {
            (name, key, OrdChange::from(value))
        }));
        assert_eq!(patch_set, expected_set);
    }
fn check_patch < ' a , I > ( patch : & Patch , changes : I ) where I : IntoIterator < Item = ( & ' a str , Vec < u8 > , Change ) > , { use std :: collections :: BTreeSet ; use std :: iter :: FromIterator ; let mut patch_set : BTreeSet < ( & str , _ , _ ) > = BTreeSet :: new ( ) ; for ( name , changes ) in patch . iter ( ) { for ( key , value ) in changes . iter ( ) { patch_set . insert ( ( name , key . clone ( ) , OrdChange :: from ( value ) ) ) ; } } let expected_set = BTreeSet :: from_iter ( changes . into_iter ( ) . map ( | ( name , key , value ) | { ( name , key , OrdChange :: from ( value ) ) } ) ) ; assert_eq ! ( patch_set expected_set ) ; }
Asserts that a patch contains only the specified changes.
Asserts that a patch contains only the specified changes .
patch
&Patch
changes
I
patch
&Patch
changes
I